1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avcodec/osq: avoid signed overflow in downsample path

Fixes: signed integer overflow: 865309950 * 256 cannot be represented in type 'int'
Fixes: 69191/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OSQ_fuzzer-6310214413385728

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:
Michael Niedermayer 2024-06-21 21:35:48 +02:00
parent 12dab3860c
commit ed34b0c54e

View File

@ -321,7 +321,7 @@ static int do_decode(AVCodecContext *avctx, AVFrame *frame, int decorrelate, int
cb->prev = prev;
if (downsample)
dst[n] *= 256;
dst[n] *= 256U;
dst[E] = dst[D];
dst[D] = dst[C];