[FFmpeg-cvslog] avformat/mov: Do not use reference stream in mov_read_sidx() if there is no reference stream

Michael Niedermayer git at videolan.org
Thu Mar 28 18:34:05 EET 2019


ffmpeg | branch: release/3.4 | Michael Niedermayer <michael at niedermayer.cc> | Tue Feb 12 23:28:35 2019 +0100| [3ae6063f5ac38ed6010dcf6e096c3022e6799834] | committer: Michael Niedermayer

avformat/mov: Do not use reference stream in mov_read_sidx() if there is no reference stream

Fixes: NULL pointer dereference
Fixes: clusterfuzz-testcase-minimized-audio_decoder_fuzzer-5634316373721088

Reported-by: Chris Cunningham <chcunningham at google.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit b0d8b7cb8e86367178ef0c35dcae359d820c3b27)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

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

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 19884b73e8..51118ba07d 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -4602,7 +4602,7 @@ static int mov_read_sidx(MOVContext *c, AVIOContext *pb, MOVAtom atom)
                 break;
             }
         }
-        for (i = 0; i < c->fc->nb_streams; i++) {
+        if (ref_st) for (i = 0; i < c->fc->nb_streams; i++) {
             st = c->fc->streams[i];
             sc = st->priv_data;
             if (!sc->has_sidx) {



More information about the ffmpeg-cvslog mailing list