mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/takdec: Fix integer overflow
Fixes: runtime error: signed integer overflow: 512 + 2147483146 cannot be represented in type 'int' Fixes: 2314/clusterfuzz-testcase-minimized-4519333877252096 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:
parent
27f80ab016
commit
0c2ef4f6b4
|
@ -483,7 +483,7 @@ static int decode_subframe(TAKDecContext *s, int32_t *decoded,
|
||||||
int v = 1 << (filter_quant - 1);
|
int v = 1 << (filter_quant - 1);
|
||||||
|
|
||||||
if (filter_order & -16)
|
if (filter_order & -16)
|
||||||
v += s->adsp.scalarproduct_int16(&s->residues[i], s->filter,
|
v += (unsigned)s->adsp.scalarproduct_int16(&s->residues[i], s->filter,
|
||||||
filter_order & -16);
|
filter_order & -16);
|
||||||
for (j = filter_order & -16; j < filter_order; j += 4) {
|
for (j = filter_order & -16; j < filter_order; j += 4) {
|
||||||
v += s->residues[i + j + 3] * s->filter[j + 3] +
|
v += s->residues[i + j + 3] * s->filter[j + 3] +
|
||||||
|
|
Loading…
Reference in New Issue