diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2022-03-11 20:25:48 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2022-04-06 20:38:06 +0200 |
commit | b19cc796eab6020c54bda92157fa5c2e84525a57 (patch) | |
tree | 6b87ff818f488bdc8dfc1b5b2abc11f1e371cb76 | |
parent | 5032883c3473b9d972bc5db57323e5633a6407e6 (diff) | |
download | ffmpeg-b19cc796eab6020c54bda92157fa5c2e84525a57.tar.gz |
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@niedermayer.cc>
-rw-r--r-- | libavcodec/mjpegbdec.c | 1 |
1 files changed, 1 insertions, 0 deletions
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 */ |