summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <[email protected]>2019-12-07 20:42:54 +0100
committerMichael Niedermayer <[email protected]>2020-07-03 12:10:23 +0200
commitb36592ce07fb81b5035f9b6cfbeab5c7c5e2c36e (patch)
treebefcde0e6b2bbc7dc49d74bb84a4308fbedcf0b7
parent84048cf37f518ab79e1a43b7acbe031f112685c8 (diff)
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 <[email protected]> (cherry picked from commit 6a865cec5e7584ef476f394fc55c1fc91cec1a14) Signed-off-by: Michael Niedermayer <[email protected]>
-rw-r--r--libavcodec/alac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/alac.c b/libavcodec/alac.c
index c9ca025186..cf0f4fc147 100644
--- a/libavcodec/alac.c
+++ b/libavcodec/alac.c
@@ -228,7 +228,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);
}
}
}