Fixes: signed integer overflow: 2147483644 + 16 cannot be represented in type 'int' Fixes: 16782/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FOURXM_fuzzer-5743163859271680
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> --- libavcodec/4xm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c index 1f4e2aee24..f0f279b5c6 100644 --- a/libavcodec/4xm.c +++ b/libavcodec/4xm.c @@ -518,6 +518,9 @@ static int decode_i_block(FourXContext *f, int16_t *block) /* AC coefs */ i = 1; for (;;) { + if (get_bits_left(&f->pre_gb) <= 0) + return AVERROR_INVALIDDATA; + code = get_vlc2(&f->pre_gb, f->pre_vlc.table, ACDC_VLC_BITS, 3); /* EOB */ -- 2.23.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".