[FFmpeg-cvslog] avcodec/mxpegdec: Check for AVDISCARD_ALL

Michael Niedermayer git at videolan.org
Wed Oct 6 19:07:56 EEST 2021


ffmpeg | branch: release/4.4 | Michael Niedermayer <michael at niedermayer.cc> | Tue Sep 14 20:16:27 2021 +0200| [58fdd476f975fbd6299c4cb2f9804e1d7ef5f2dd] | committer: Michael Niedermayer

avcodec/mxpegdec: Check for AVDISCARD_ALL

Fixes: Fixes NULL pointer dereference
Fixes: 36610/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MXPEG_fuzzer-6052641783283712
Fixes: 37907/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MXPEG_fuzzer-4725170850365440
Fixes: 37904/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MXPEG_fuzzer-6367889262247936
Fixes: 38085/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MXPEG_fuzzer-5175270823297024

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 20afd3a63a75a160f61a98a8dcfe06f527ea19b4)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavcodec/mxpegdec.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/mxpegdec.c b/libavcodec/mxpegdec.c
index 763ce5871d..a068baf758 100644
--- a/libavcodec/mxpegdec.c
+++ b/libavcodec/mxpegdec.c
@@ -193,6 +193,9 @@ static int mxpeg_decode_frame(AVCodecContext *avctx,
     int start_code;
     int ret;
 
+    if (avctx->skip_frame == AVDISCARD_ALL)
+        return AVERROR_PATCHWELCOME;
+
     buf_ptr = buf;
     buf_end = buf + buf_size;
     jpg->got_picture = 0;



More information about the ffmpeg-cvslog mailing list