You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/flacdec: Fix signed integre overflow
Fixes: signed integer overflow: 3011809745540902265 + 6323452730883571725 cannot be represented in type 'long' Fixes: 45982/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FLAC_fuzzer-6687553022722048 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:
@@ -513,7 +513,7 @@ static int decode_subframe_lpc_33bps(FLACContext *s, int64_t *decoded,
|
|||||||
for (i = pred_order; i < s->blocksize; i++, decoded++) {
|
for (i = pred_order; i < s->blocksize; i++, decoded++) {
|
||||||
int64_t sum = 0;
|
int64_t sum = 0;
|
||||||
for (j = 0; j < pred_order; j++)
|
for (j = 0; j < pred_order; j++)
|
||||||
sum += (int64_t)coeffs[j] * decoded[j];
|
sum += (int64_t)coeffs[j] * (uint64_t)decoded[j];
|
||||||
decoded[j] = residual[i] + (sum >> qlevel);
|
decoded[j] = residual[i] + (sum >> qlevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user