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

Tristan Matthews git at videolan.org
Tue Apr 19 18:28:52 CEST 2016


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

vpx: fix segfault on decoding (refs #16836)

(cherry picked from commit f116ca5e75b6723784406a228510cc71da26bf90)
(cherry picked from commit 6332bce8a3ee811bbc9471d6d6232b5fa6bb3499)

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

 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 1707e72..74224bc 100644
--- a/modules/codec/vpx.c
+++ b/modules/codec/vpx.c
@@ -68,9 +68,9 @@ 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)
+    if( !pp_block || !*pp_block )
         return NULL;
+    block_t *block = *pp_block;
 
     if (block->i_flags & (BLOCK_FLAG_DISCONTINUITY|BLOCK_FLAG_CORRUPTED))
         return NULL;



More information about the vlc-commits mailing list