mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
avformat/bfi: Check chunk_header
Fixes: signed integer overflow: -2147483648 - 3 cannot be represented in type 'int' Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_BFI_fuzzer-6665764123836416 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 638a151a877c27a46c15643db26c9ba726feecde) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
d72a06402c
commit
268f25c774
@ -69,6 +69,9 @@ static int bfi_read_header(AVFormatContext * s)
|
||||
/* Set the total number of frames. */
|
||||
avio_skip(pb, 8);
|
||||
chunk_header = avio_rl32(pb);
|
||||
if (chunk_header < 3)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
bfi->nframes = avio_rl32(pb);
|
||||
avio_rl32(pb);
|
||||
avio_rl32(pb);
|
||||
|
Loading…
x
Reference in New Issue
Block a user