[FFmpeg-cvslog] avcodec/osq: use unsigned for decorrelation
Michael Niedermayer
git at videolan.org
Tue Sep 24 17:40:05 EEST 2024
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Thu Sep 19 22:03:37 2024 +0200| [e9f588af9530e5e6f9422ffa0d8e8dc8f80a2ae1] | committer: Michael Niedermayer
avcodec/osq: use unsigned for decorrelation
Fixes: signed integer overflow: 1205469696 + 1901074655 cannot be represented in type 'int'
Fixes: 70773/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OSQ_fuzzer-5419594888577024
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e9f588af9530e5e6f9422ffa0d8e8dc8f80a2ae1
---
libavcodec/osq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/osq.c b/libavcodec/osq.c
index 2b75364c18..1bf6264699 100644
--- a/libavcodec/osq.c
+++ b/libavcodec/osq.c
@@ -342,7 +342,7 @@ static int do_decode(AVCodecContext *avctx, AVFrame *frame, int decorrelate, int
if (nb_channels == 2 && ch == 1) {
if (decorrelate)
- dst[n] += s->decode_buffer[0][OFFSET+n];
+ dst[n] += (unsigned)s->decode_buffer[0][OFFSET+n];
}
if (downsample)
More information about the ffmpeg-cvslog
mailing list