diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-02-12 23:28:35 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-02-14 21:55:43 +0100 |
commit | b0d8b7cb8e86367178ef0c35dcae359d820c3b27 (patch) | |
tree | 7af974a665273755043c683edf5893c2404bd495 /libavformat/mov.c | |
parent | f1f66df6a204fdc08b8763004de2df3e20bab8f3 (diff) |
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>
Diffstat (limited to 'libavformat/mov.c')
-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 73a5ec240e..bbd588c705 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -5045,7 +5045,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) { |