aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-12-07 20:42:54 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2020-04-23 21:29:01 +0200
commitaefc24beb24494b15d4b79f9f78f6013ac100db5 (patch)
treed148733cdfdd2a5ccd63248e166f3354ed7be792
parent20acb6d1be69bc9ff29a49da984203a31a38d765 (diff)
downloadffmpeg-aefc24beb24494b15d4b79f9f78f6013ac100db5.tar.gz
avcodec/alac: Fix integer overflow in LPC coefficient adaption
Fixes: signed integer overflow: 267693597 * 10 cannot be represented in type 'int' Fixes: 19237/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALAC_fuzzer-5755407700328448 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 6a865cec5e7584ef476f394fc55c1fc91cec1a14) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/alac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/alac.c b/libavcodec/alac.c
index f60fcfcd9a..a4e899b4de 100644
--- a/libavcodec/alac.c
+++ b/libavcodec/alac.c
@@ -224,7 +224,7 @@ static void lpc_prediction(int32_t *error_buffer, uint32_t *buffer_out,
sign = sign_only(val) * error_sign;
lpc_coefs[j] -= sign;
val *= (unsigned)sign;
- error_val -= (val >> lpc_quant) * (j + 1);
+ error_val -= (val >> lpc_quant) * (j + 1U);
}
}
}