[FFmpeg-cvslog] avcodec/vmixdec: Fix signed integer overflow in dc
Michael Niedermayer
git at videolan.org
Mon Sep 25 22:42:24 EEST 2023
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Tue Sep 5 02:17:40 2023 +0200| [d897f82cf8f39cdb770ab433b018ebd840bb2237] | committer: Michael Niedermayer
avcodec/vmixdec: Fix signed integer overflow in dc
Fixes: signed integer overflow: 2147483181 + 1024 cannot be represented in type 'int'
Fixes: 61117/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VMIX_fuzzer-5387692433866752
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=d897f82cf8f39cdb770ab433b018ebd840bb2237
---
libavcodec/vmixdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/vmixdec.c b/libavcodec/vmixdec.c
index 962ab8339b..d6b6e3557f 100644
--- a/libavcodec/vmixdec.c
+++ b/libavcodec/vmixdec.c
@@ -148,7 +148,7 @@ static int decode_dcac(AVCodecContext *avctx,
ac_run = get_ue_golomb_long(ac_gb);
}
- block[0] = (dc << lshift) + add;
+ block[0] = ((unsigned)dc << lshift) + (unsigned)add;
s->idsp.idct_put(dst + x, linesize, block);
}
More information about the ffmpeg-cvslog
mailing list