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

Tristan Matthews git at videolan.org
Sun Aug 10 03:03:44 CEST 2014


vlc | branch: master | Tristan Matthews <le.businessman at gmail.com> | Sat Aug  9 21:02:00 2014 -0400| [4941746e6379c43d56fc70ad5a7ad83d99081b2b] | committer: Tristan Matthews

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

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

 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