]> git.sesse.net Git - vlc/commitdiff
Protect against division by 0 on corrupted file (real).
authorLaurent Aimar <fenrir@videolan.org>
Sun, 14 Dec 2008 16:23:28 +0000 (17:23 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Sun, 14 Dec 2008 16:23:28 +0000 (17:23 +0100)
modules/demux/real.c

index a9a45974a809765d6c6cf648bbc7b7570a01269f..7d09aa917e95d160b694f2a43fef65473e22c6f5 100644 (file)
@@ -1481,7 +1481,8 @@ static int CodecAudioParse( demux_t *p_demux, int i_tk_id, const uint8_t *p_data
         fmt.audio.i_flavor = i_flavor;
     case VLC_FOURCC('c','o','o','k'):
     case VLC_FOURCC('a','t','r','c'):
-        if( i_subpacket_size <= 0 )
+        if( i_subpacket_size <= 0 ||
+            i_frame_size / i_subpacket_size <= 0 )
         {
             es_format_Clean( &fmt );
             return VLC_EGENERIC;