[FFmpeg-cvslog] avformat/avidec: Check for dv streams before using priv_data in parse ##dc/##wb

Michael Niedermayer git at videolan.org
Fri Mar 26 17:05:27 EET 2021


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Thu Mar 18 10:59:19 2021 +0100| [f733688d30021587c3f3a1b280d6ece8b04f26ff] | committer: Michael Niedermayer

avformat/avidec: Check for dv streams before using priv_data in parse ##dc/##wb

Fixes: null pointer dereference
Fixes: 31588/clusterfuzz-testcase-minimized-ffmpeg_dem_AVI_fuzzer-6165716135968768

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavformat/avidec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index fa0599501a..48370fe5ce 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -1288,7 +1288,7 @@ start_sync:
                 AVStream *st1   = s->streams[1];
                 AVIStream *ast1 = st1->priv_data;
                 // workaround for broken small-file-bug402.avi
-                if (   d[2] == 'w' && d[3] == 'b'
+                if (ast1 && d[2] == 'w' && d[3] == 'b'
                    && n == 0
                    && st ->codecpar->codec_type == AVMEDIA_TYPE_VIDEO
                    && st1->codecpar->codec_type == AVMEDIA_TYPE_AUDIO



More information about the ffmpeg-cvslog mailing list