mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/iff: Check data_size
Fixes: infinite loop Fixes: 27834/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-5694930919620608 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
adf72718a4
commit
001bc594d8
@ -368,7 +368,7 @@ static int read_dst_frame(AVFormatContext *s, AVPacket *pkt)
|
||||
data_size = iff->is_64bit ? avio_rb64(pb) : avio_rb32(pb);
|
||||
data_pos = avio_tell(pb);
|
||||
|
||||
if (data_size < 1)
|
||||
if (data_size < 1 || data_size >= INT64_MAX)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
switch (chunk_id) {
|
||||
|
Loading…
Reference in New Issue
Block a user