[FFmpeg-devel] [PATCH 1/3] avcodec/mjpegbdec: Set buf_size

Michael Niedermayer michael at niedermayer.cc
Fri Mar 11 22:20:23 EET 2022


Fixes: Timeout
Fixes: 45170/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEGB_fuzzer-5874820431085568

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/mjpegbdec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/mjpegbdec.c b/libavcodec/mjpegbdec.c
index 218be41192..c3d3125142 100644
--- a/libavcodec/mjpegbdec.c
+++ b/libavcodec/mjpegbdec.c
@@ -57,6 +57,7 @@ static int mjpegb_decode_frame(AVCodecContext *avctx,
     buf_end = buf + buf_size;
     s->got_picture = 0;
     s->adobe_transform = -1;
+    s->buf_size = buf_size;
 
 read_header:
     /* reset on every SOI */
-- 
2.17.1



More information about the ffmpeg-devel mailing list