Commit 09767524 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/aacdec_fixed: Fix integer overflow in predict()

Fixes: runtime error: signed integer overflow: -2110708110 + -82837504 cannot be represented in type 'int'
Fixes: 3547/clusterfuzz-testcase-minimized-6009386439802880

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent f1251a6b
......@@ -307,9 +307,9 @@ static av_always_inline void predict(PredictorState *ps, int *coef,
if (shift < 31) {
if (shift > 0) {
*coef += (pv.mant + (1 << (shift - 1))) >> shift;
*coef += (unsigned)((pv.mant + (1 << (shift - 1))) >> shift);
} else
*coef += pv.mant << -shift;
*coef += (unsigned)(pv.mant << -shift);
}
}
......
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