[FFmpeg-cvslog] r11144 - trunk/libavformat/mp3.c
michael
subversion
Mon Dec 3 05:49:02 CET 2007
Author: michael
Date: Mon Dec 3 05:49:01 2007
New Revision: 11144
Log:
prevent O(n^2) execution of ff_mpa_decode_header() for valid mp3 files
Modified:
trunk/libavformat/mp3.c
Modified: trunk/libavformat/mp3.c
==============================================================================
--- trunk/libavformat/mp3.c (original)
+++ trunk/libavformat/mp3.c Mon Dec 3 05:49:01 2007
@@ -418,6 +418,8 @@ static int mp3_read_probe(AVProbeData *p
max_frames = FFMAX(max_frames, frames);
if(buf == p->buf)
first_frames= frames;
+ if(buf2 > end)
+ break;
}
if (first_frames>=3) return AVPROBE_SCORE_MAX/2+1;
else if(max_frames>=3) return AVPROBE_SCORE_MAX/4;
More information about the ffmpeg-cvslog
mailing list