Commit 7c36ee21 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/sbrdsp_template: Fix: runtime error: signed integer overflow:...

avcodec/sbrdsp_template: Fix: runtime error: signed integer overflow: 849815297 + 1315389781 cannot be represented in type 'int'

Fixes: 1770/clusterfuzz-testcase-minimized-5285511235108864

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent fe8c9420
......@@ -33,8 +33,13 @@ static void sbr_qmf_deint_bfly_c(INTFLOAT *v, const INTFLOAT *src0, const INTFLO
{
int i;
for (i = 0; i < 64; i++) {
v[ i] = AAC_SRA_R((src0[i] - src1[63 - i]), 5);
v[127 - i] = AAC_SRA_R((src0[i] + src1[63 - i]), 5);
#if USE_FIXED
v[ i] = (int)(0x10U + src0[i] - src1[63 - i]) >> 5;
v[127 - i] = (int)(0x10U + src0[i] + src1[63 - i]) >> 5;
#else
v[ i] = src0[i] - src1[63 - i];
v[127 - i] = src0[i] + src1[63 - i];
#endif
}
}
......
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