]> git.sesse.net Git - vlc/blobdiff - modules/demux/nuv.c
mmap: Correct [cbc1122ac4551505181ea048ca14a5f87041090f]
[vlc] / modules / demux / nuv.c
index fb4ba3159a4321d3192f09eca8badb2a045785b9..0a7c8917c8876941765c4ba2945d8d0892ad1acc 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;
 
@@ -785,7 +787,7 @@ static int SeekTableLoad( demux_t *p_demux, demux_sys_t *p_sys )
         {
             p_kfa_table = malloc( fh.i_length );
 
-            if( p_seek_table == NULL )
+            if( p_kfa_table == NULL )
             {
                 free( p_seek_table );
                 return VLC_ENOMEM;