1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avcodec/flacdsp: Fix: runtime error: signed integer overflow: -1027555328 + -1226681270 cannot be represented in type 'int'

Fixes: 673/clusterfuzz-testcase-5948736536576000

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2017-02-25 21:07:26 +01:00
parent 87eb374970
commit 7e9ba78f6b

View File

@ -67,7 +67,7 @@ static void flac_lpc_16_c(int32_t *decoded, const int coeffs[32],
int sum = 0; int sum = 0;
for (j = 0; j < pred_order; j++) for (j = 0; j < pred_order; j++)
sum += coeffs[j] * (SUINT)decoded[j]; sum += coeffs[j] * (SUINT)decoded[j];
decoded[j] += sum >> qlevel; decoded[j] = decoded[j] + (unsigned)(sum >> qlevel);
} }
} }