aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-02-12 23:28:35 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2019-03-14 00:24:44 +0100
commitd25f388584a36b709c780b4bf91de2cabfe6137f (patch)
tree049d657fe845f24edb1e5d9ea3dd32a26443cc0e
parent1a82246caed8496aa932a668dce6139d220f68ca (diff)
downloadffmpeg-d25f388584a36b709c780b4bf91de2cabfe6137f.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>
-rw-r--r--libavformat/mov.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 3491d680db..60309b4869 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -5050,7 +5050,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) {