mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-12-24 11:52:06 +08: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:
committed by
Michael Niedermayer
parent
9d8469e431
commit
2ddc3cbd98
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user