[FFmpeg-devel] [PATCH 08/11] avcodec/osq: fix integer overflow when applying factor
Michael Niedermayer
michael at niedermayer.cc
Sat Jul 20 03:52:38 EEST 2024
Fixes: signed integer overflow: -35511773 * 256 cannot be represented in type 'int'
Fixes: 70406/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OSQ_fuzzer-6545326804434944
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavcodec/osq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/osq.c b/libavcodec/osq.c
index 42a46b25ce5..4e921896c0d 100644
--- a/libavcodec/osq.c
+++ b/libavcodec/osq.c
@@ -356,7 +356,7 @@ static int osq_decode_block(AVCodecContext *avctx, AVFrame *frame)
const int nb_channels = avctx->ch_layout.nb_channels;
const int nb_samples = frame->nb_samples;
OSQContext *s = avctx->priv_data;
- const int factor = s->factor;
+ const unsigned factor = s->factor;
int ret, decorrelate, downsample;
GetBitContext *gb = &s->gb;
--
2.45.2
More information about the ffmpeg-devel
mailing list