mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avformat/xwma: Check for EOF in dpds_table read code
Fixes: Timeout (>30 -> 140ms)
Fixes: 26478/clusterfuzz-testcase-minimized-ffmpeg_dem_XWMA_fuzzer-5918147066200064
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 44b18a76b8
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
c0b0cb5d80
commit
d4478ed244
@ -178,6 +178,10 @@ static int xwma_read_header(AVFormatContext *s)
|
||||
}
|
||||
|
||||
for (i = 0; i < dpds_table_size; ++i) {
|
||||
if (avio_feof(pb)) {
|
||||
ret = AVERROR_INVALIDDATA;
|
||||
goto fail;
|
||||
}
|
||||
dpds_table[i] = avio_rl32(pb);
|
||||
size -= 4;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user