]> git.sesse.net Git - vlc/commitdiff
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 2af44ef05591457d1cb086029f4d0784263ddff5..a8524a6b5130f0a4b1e2a7810cb0c5d35431e949 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;