[vlc-commits] vpx: fix segfault on decoding (refs #16836)

Tristan Matthews git at videolan.org
Tue Apr 19 18:05:21 CEST 2016


vlc | branch: master | Tristan Matthews <tmatth at videolan.org> | Tue Apr 19 11:54:52 2016 -0400| [f116ca5e75b6723784406a228510cc71da26bf90] | committer: Tristan Matthews

vpx: fix segfault on decoding (refs #16836)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f116ca5e75b6723784406a228510cc71da26bf90
---

 modules/codec/vpx.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/codec/vpx.c b/modules/codec/vpx.c
index a028611..a8831d5 100644
--- a/modules/codec/vpx.c
+++ b/modules/codec/vpx.c
@@ -108,8 +108,8 @@ static picture_t *Decode(decoder_t *dec, block_t **pp_block)
 {
     struct vpx_codec_ctx *ctx = &dec->p_sys->ctx;
 
-    block_t *block = *pp_block;
-    if (!block)
+    block_t *block = pp_block ? *pp_block : NULL;
+    if (!pp_block || !block)
         return NULL;
 
     if (block->i_flags & (BLOCK_FLAG_CORRUPTED)) {



More information about the vlc-commits mailing list