1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avcodec/flacdsp: Fix integer-overflow in flac_lpc_33_c

This fix copies a couple of casts from surrounding functions.
See https://crbug.com/432528781 for stack trace details.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Dale Curtis
2025-07-29 22:05:19 +00:00
committed by Michael Niedermayer
parent 9d8469e431
commit 2ddc3cbd98

View File

@ -94,7 +94,7 @@ static void flac_lpc_33_c(int64_t *decoded, const int32_t *residual,
int64_t sum = 0;
for (j = 0; j < pred_order; j++)
sum += (int64_t)coeffs[j] * (uint64_t)decoded[j];
decoded[j] = residual[i] + (sum >> qlevel);
decoded[j] = (uint64_t)residual[i] + (uint64_t)(sum >> qlevel);
}
}