avcodec/sbrdsp_fixed: Fix integer overflows in sbr_qmf_deint_neg_c()

Fixes: signed integer overflow: 2147483645 + 16 cannot be represented in type 'int'
Fixes: 46993/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-4759025234870272

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 1537f40516)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2022-05-02 00:51:12 +02:00
parent aec94df69b
commit 15263eb8c2
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
1 changed files with 2 additions and 2 deletions

View File

@ -114,8 +114,8 @@ static void sbr_qmf_deint_neg_c(int *v, const int *src)
{
int i;
for (i = 0; i < 32; i++) {
v[ i] = ( src[63 - 2*i ] + 0x10) >> 5;
v[63 - i] = (-src[63 - 2*i - 1] + 0x10) >> 5;
v[ i] = (int)(0x10U + src[63 - 2*i ]) >> 5;
v[63 - i] = (int)(0x10U - src[63 - 2*i - 1]) >> 5;
}
}