Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-09-06 11:36:43 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2019-09-24 18:53:39 +0300
commit0831cbfe099192098d91e049ed9cf03c5a9cb376 (patch)
tree0cbbf25945ad3218ee608248d51a13a159c723ef /libavcodec/alac.c
parent72db18e929cf3310cfc2a6eb4170a0d390e5a105 (diff)
avcodec/alac: fix undefined behavior with INT_MIN in lpc_prediction()
Fixes: signed integer overflow: -2147483648 * -1 cannot be represented in type 'int' Fixes: 16786/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALAC_fuzzer-5632818851348480 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/alac.c')
-rw-r--r--libavcodec/alac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/alac.c b/libavcodec/alac.c
index 782d461b22..c606f2af0e 100644
--- a/libavcodec/alac.c
+++ b/libavcodec/alac.c
@@ -222,7 +222,7 @@ static void lpc_prediction(int32_t *error_buffer, uint32_t *buffer_out,
/* adapt LPC coefficients */
error_sign = sign_only(error_val);
if (error_sign) {
- for (j = 0; j < lpc_order && (int)error_val * error_sign > 0; j++) {
+ for (j = 0; j < lpc_order && (int)(error_val * error_sign) > 0; j++) {
int sign;
val = d - pred[j];
sign = sign_only(val) * error_sign;