diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2024-06-21 21:35:48 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-07-12 22:45:58 +0200 |
commit | ed34b0c54ebdce7f741d9fb6a9ac11a1816df59c (patch) | |
tree | 9c5280ea480282f9e9ab00358708ef46206aa247 | |
parent | 12dab3860cf79404c097a319b09d10fac0ab2cc5 (diff) | |
download | ffmpeg-ed34b0c54ebdce7f741d9fb6a9ac11a1816df59c.tar.gz |
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>
-rw-r--r-- | libavcodec/osq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/osq.c b/libavcodec/osq.c index 7d0e8a87d5..1bd4485f07 100644 --- a/libavcodec/osq.c +++ b/libavcodec/osq.c @@ -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]; |