mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avformat/rmdec: Check remaining space in debug av_log() loop
Fixes: Timeout (long -> 2 ms)
Fixes: 26709/clusterfuzz-testcase-minimized-ffmpeg_dem_IVR_fuzzer-5665833403285504
Fixes: 27522/clusterfuzz-testcase-minimized-ffmpeg_dem_IVR_fuzzer-6321071221112832
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a8fe78decd
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
bbdd767053
commit
73c963692e
@ -1292,8 +1292,11 @@ static int ivr_read_header(AVFormatContext *s)
|
||||
int j;
|
||||
|
||||
av_log(s, AV_LOG_DEBUG, "%s = '0x", key);
|
||||
for (j = 0; j < len; j++)
|
||||
for (j = 0; j < len; j++) {
|
||||
if (avio_feof(pb))
|
||||
return AVERROR_INVALIDDATA;
|
||||
av_log(s, AV_LOG_DEBUG, "%X", avio_r8(pb));
|
||||
}
|
||||
av_log(s, AV_LOG_DEBUG, "'\n");
|
||||
} else if (len == 4 && type == 3 && !strncmp(key, "Duration", tlen)) {
|
||||
st->duration = avio_rb32(pb);
|
||||
|
Loading…
Reference in New Issue
Block a user