Message ID | 20230905020358.32527-1-michael@niedermayer.cc |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,1/2] avcodec/vmixdec: Fix signed integer overflow in dc | expand |
On Tue, Sep 05, 2023 at 04:03:57AM +0200, Michael Niedermayer wrote: > 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@niedermayer.cc> > --- > libavcodec/vmixdec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) will apply this [...]
diff --git a/libavcodec/vmixdec.c b/libavcodec/vmixdec.c index b77c90929a..8f2278b2ea 100644 --- a/libavcodec/vmixdec.c +++ b/libavcodec/vmixdec.c @@ -134,7 +134,7 @@ static int decode_dcac(AVCodecContext *avctx, ac_run = get_ue_golomb_long(ac_gb); } - block[0] = dc + add; + block[0] = dc + (unsigned)add; s->idsp.idct_put(dst + x, linesize, block); }
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@niedermayer.cc> --- libavcodec/vmixdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)