[vlc-commits] vorbis: fix dereference after null check (cid #403019)

Tristan Matthews git at videolan.org
Sun Aug 10 20:17:08 CEST 2014


vlc/vlc-2.2 | branch: master | Tristan Matthews <le.businessman at gmail.com> | Sat Aug  9 21:02:00 2014 -0400| [1feb0545d9a67f247a46fe1db31b7f422771887c] | committer: Jean-Baptiste Kempf

vorbis: fix dereference after null check (cid #403019)

(cherry picked from commit 4941746e6379c43d56fc70ad5a7ad83d99081b2b)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/codec/vorbis.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/codec/vorbis.c b/modules/codec/vorbis.c
index 53b2c60..077a1c3 100644
--- a/modules/codec/vorbis.c
+++ b/modules/codec/vorbis.c
@@ -318,7 +318,8 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
     {
         if( ProcessHeaders( p_dec ) )
         {
-            block_Release( *pp_block );
+            if( *pp_block )
+                block_Release( *pp_block );
             return NULL;
         }
         p_sys->b_has_headers = true;



More information about the vlc-commits mailing list