mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
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>
This commit is contained in:
parent
8701af40bc
commit
28008bf95e
@ -1009,7 +1009,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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user