mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-22 15:23:11 +00:00
avformat/asf: Check picsize
Fixes: signed integer overflow: 1073750247 * 2 cannot be represented in type 'int' Fixes: 70722/clusterfuzz-testcase-minimized-ffmpeg_dem_ASF_O_fuzzer-5447231587549184 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
ad35eaf848
commit
fde8637fda
@ -90,8 +90,8 @@ static int asf_read_picture(AVFormatContext *s, int len)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (picsize >= len) {
|
||||
av_log(s, AV_LOG_ERROR, "Invalid attached picture data size: %d >= %d.\n",
|
||||
if (picsize >= len || ((int64_t)len - picsize) * 2 + 1 > INT_MAX) {
|
||||
av_log(s, AV_LOG_ERROR, "Invalid attached picture data size: %d (len = %d).\n",
|
||||
picsize, len);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user