mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-02-13 19:05:37 +00:00
avcodec/ffv1dec: Fix integer overflow in read_quant_table()
Fixes: runtime error: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
Fixes: 3361/clusterfuzz-testcase-minimized-5065842955911168
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 d00fc952b6)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
eb505747a7
commit
2ccc30217a
1 changed files with 1 additions and 1 deletions
|
|
@ -480,7 +480,7 @@ static int read_quant_table(RangeCoder *c, int16_t *quant_table, int scale)
|
|||
memset(state, 128, sizeof(state));
|
||||
|
||||
for (v = 0; i < 128; v++) {
|
||||
unsigned len = get_symbol(c, state, 0) + 1;
|
||||
unsigned len = get_symbol(c, state, 0) + 1U;
|
||||
|
||||
if (len > 128 - i)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue