avcodec/ttadsp: Fix integer overflows in tta_filter_process_c()

Fixes: signed integer overflow: 822841647 + 1647055738 cannot be represented in type 'int'
Fixes: 39935/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TTA_fuzzer-4592657142251520

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2021-10-15 00:04:59 +02:00
parent 6bba9d960b
commit f24028c798
1 changed files with 3 additions and 3 deletions

View File

@ -47,9 +47,9 @@ static void tta_filter_process_c(int32_t *qmi, int32_t *dx, int32_t *dl,
*error = *in;
*in += (round >> shift);
dl[4] = -dl[5]; dl[5] = -dl[6];
dl[6] = *in - dl[7]; dl[7] = *in;
dl[5] += dl[6]; dl[4] += dl[5];
dl[4] = -(unsigned)dl[5]; dl[5] = -(unsigned)dl[6];
dl[6] = *in -(unsigned)dl[7]; dl[7] = *in;
dl[5] += (unsigned)dl[6]; dl[4] += (unsigned)dl[5];
}
av_cold void ff_ttadsp_init(TTADSPContext *c)