提交 001bc594 编写于 作者: M Michael Niedermayer

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/ffmpegSigned-off-by: NMichael Niedermayer <michael@niedermayer.cc>
上级 adf72718
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册