[vlc-devel] commit: nuv demux: NULL dereferencing (CID 37) (Derk-Jan Hartman )

git version control git at videolan.org
Thu Oct 9 13:45:42 CEST 2008


vlc | branch: master | Derk-Jan Hartman <hartman at videolan.org> | Thu Oct  9 13:44:17 2008 +0200| [83b477d2cbceb50f136650ea7074461f7c2a9212] | committer: Derk-Jan Hartman 

nuv demux: NULL dereferencing (CID 37)

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

 modules/demux/nuv.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/modules/demux/nuv.c b/modules/demux/nuv.c
index fb4ba31..38ccecd 100644
--- a/modules/demux/nuv.c
+++ b/modules/demux/nuv.c
@@ -385,7 +385,9 @@ static int Demux( demux_t *p_demux )
     }
 
     /* */
-    p_data = stream_Block( p_demux->s, fh.i_length );
+    if( ( p_data = stream_Block( p_demux->s, fh.i_length ) ) == NULL )
+        return 0;
+
     p_data->i_dts = (int64_t)fh.i_timecode * 1000;
     p_data->i_pts = (fh.i_type == 'V') ? 0 : p_data->i_dts;
 




More information about the vlc-devel mailing list