Commit 10eabb8e authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/interplayacm: Fix overflow of last unused value

Fixes: signed integer overflow: -2147450880 - 65535 cannot be represented in type 'int'
Fixes: 18393/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INTERPLAY_ACM_fuzzer-5667520110919680

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 7786f6c3
...@@ -529,7 +529,7 @@ static int decode_block(InterplayACMContext *s) ...@@ -529,7 +529,7 @@ static int decode_block(InterplayACMContext *s)
for (i = 1, x = -val; i <= count; i++) { for (i = 1, x = -val; i <= count; i++) {
s->midbuf[-i] = x; s->midbuf[-i] = x;
x -= val; x -= (unsigned)val;
} }
ret = fill_block(s); ret = fill_block(s);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment