Commit 24e95f9d authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/wavpack: Fix integer overflow

Fixes: runtime error: signed integer overflow: 227511904 + 1964113935 cannot be represented in type 'int'
Fixes: 2331/clusterfuzz-testcase-minimized-6182185830711296

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 0c2ef4f6
......@@ -225,7 +225,7 @@ static int wv_get_value(WavpackFrameContext *ctx, GetBitContext *gb,
INC_MED(1);
DEC_MED(2);
} else {
base = GET_MED(0) + GET_MED(1) + GET_MED(2) * (t - 2);
base = GET_MED(0) + GET_MED(1) + GET_MED(2) * (t - 2U);
add = GET_MED(2) - 1;
INC_MED(0);
INC_MED(1);
......
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