[FFmpeg-cvslog] avcodec/mjpegbdec: Set buf_size

Michael Niedermayer git at videolan.org
Tue Mar 29 02:28:05 EEST 2022


ffmpeg | branch: release/5.0 | Michael Niedermayer <michael at niedermayer.cc> | Fri Mar 11 20:25:48 2022 +0100| [780de33f322f8152f830ccadf125a382facc7a43] | 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=780de33f322f8152f830ccadf125a382facc7a43
---

 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 */



More information about the ffmpeg-cvslog mailing list