diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-02-12 23:28:35 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-03-21 10:42:51 +0100 |
commit | 5f799f0cee95fc92fdcaba543f491be997f5c52a (patch) | |
tree | f8c0409f14d9d273748cc9a95e333aed22452e2f /libavformat | |
parent | d5a946615ffc7d7f63485b67ce61f0c9b9fab6cb (diff) | |
download | ffmpeg-5f799f0cee95fc92fdcaba543f491be997f5c52a.tar.gz |
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@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b0d8b7cb8e86367178ef0c35dcae359d820c3b27)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mov.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 8e38ad2ff6..14a02dc4e6 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -5029,7 +5029,7 @@ static int mov_read_sidx(MOVContext *c, AVIOContext *pb, MOVAtom atom) } } } - 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) { |