mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-26 21:10:34 +00:00
avformat/av1dec: check size before addition in probing
Fixes: signed integer overflow: 175 + 2147483571 cannot be represented in type 'int' Fixes: 26833/clusterfuzz-testcase-minimized-ffmpeg_dem_IMAGE2_fuzzer-5969501214212096 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
47c146a56b
commit
76b6c46a81
@ -361,7 +361,7 @@ static int obu_probe(const AVProbeData *p)
|
||||
ret = read_obu_with_size(p->buf + cnt, p->buf_size - cnt, &obu_size, &type);
|
||||
if (ret < 0 || obu_size <= 0)
|
||||
return 0;
|
||||
cnt += ret;
|
||||
cnt += FFMIN(ret, p->buf_size - cnt);
|
||||
|
||||
ret = get_score(type, &seq);
|
||||
if (ret >= 0)
|
||||
|
Loading…
Reference in New Issue
Block a user