A small malloc check.
authorLaurent Aimar <fenrir@videolan.org>
Fri, 29 Jun 2007 23:50:39 +0000 (23:50 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Fri, 29 Jun 2007 23:50:39 +0000 (23:50 +0000)
modules/demux/subtitle.c

index 2af44ef..a8524a6 100644 (file)
@@ -1190,6 +1190,8 @@ static int ParseMPL2( demux_t *p_demux, subtitle_t *p_subtitle )
             return VLC_EGENERIC;
 
         psz_text = malloc( strlen(s) + 1 );
+        if( !psz_text )
+            return VLC_ENOMEM;
 
         i_start = 0;
         i_stop  = 0;