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>2022-02-08 02:43:56 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2022-04-06 21:27:35 +0300
commitcd310f05024de48d69c9ebf5581b42e9307b6c40 (patch)
tree423f3a14dae22cd4d6d73c0dedd73eaa844530b9 /libavcodec/sonic.c
parentcc53ce7e5b009921ee80a5974cb978ef112f1148 (diff)
avcodec/sonic: Use unsigned for predictor_k to avoid undefined behavior
Fixes: signed integer overflow: -1094995529 * 24 cannot be represented in type 'int' Fixes: 44436/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SONIC_fuzzer-4874459459223552 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 28008bf95ed9b2ab5945ae6658358ad7c7f1df35) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/sonic.c')
-rw-r--r--libavcodec/sonic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/sonic.c b/libavcodec/sonic.c
index c049f6aedc..8662737837 100644
--- a/libavcodec/sonic.c
+++ b/libavcodec/sonic.c
@@ -1004,7 +1004,7 @@ static int sonic_decode_frame(AVCodecContext *avctx,
// dequantize
for (i = 0; i < s->num_taps; i++)
- s->predictor_k[i] *= s->tap_quant[i];
+ s->predictor_k[i] *= (unsigned) s->tap_quant[i];
if (s->lossless)
quant = 1;