]> git.sesse.net Git - vlc/commitdiff
nuv demux: NULL dereferencing (CID 37)
authorDerk-Jan Hartman <hartman@videolan.org>
Thu, 9 Oct 2008 11:44:17 +0000 (13:44 +0200)
committerDerk-Jan Hartman <hartman@videolan.org>
Thu, 9 Oct 2008 11:44:17 +0000 (13:44 +0200)
modules/demux/nuv.c

index fb4ba3159a4321d3192f09eca8badb2a045785b9..38ccecd63c304d500dc7a399c9b8a3f65dcc25bb 100644 (file)
@@ -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;