[FFmpeg-cvslog] avcodec/mjpegbdec: Set buf_size

Michael Niedermayer git at videolan.org
Wed Apr 6 22:56:14 EEST 2022


ffmpeg | branch: release/4.3 | Michael Niedermayer <michael at niedermayer.cc> | Fri Mar 11 20:25:48 2022 +0100| [b19cc796eab6020c54bda92157fa5c2e84525a57] | committer: Michael Niedermayer

avcodec/mjpegbdec: Set buf_size

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>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b19cc796eab6020c54bda92157fa5c2e84525a57
---

 libavcodec/mjpegbdec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/mjpegbdec.c b/libavcodec/mjpegbdec.c
index 19875a2ddb..3fab4a66bc 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 */



More information about the ffmpeg-cvslog mailing list