Module: libav
Branch: release/12
Commit: ff85aacc593ebbd70daa963b7d7e809c15b23e8a

Author:    Luca Barbato <[email protected]>
Committer: Sean McGovern <[email protected]>
Date:      Sat Feb 11 21:44:08 2017 +0000

mov: Do not try to parse multiple stsd for the same track

Bug-Id: 1017

Signed-off-by: Luca Barbato <[email protected]>
(cherry picked from commit b446f0e98f85e2e931b476e52b319f1c49244660)
Signed-off-by: Sean McGovern <[email protected]>

---

 libavformat/mov.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index af748cb..2ff5211 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1902,6 +1902,12 @@ static int mov_read_stsd(MOVContext *c, AVIOContext *pb, 
MOVAtom atom)
     avio_rb24(pb); /* flags */
     entries = avio_rb32(pb);
 
+    if (sc->extradata) {
+        av_log(c->fc, AV_LOG_ERROR,
+               "Duplicate stsd found in this track.\n");
+        return AVERROR_INVALIDDATA;
+    }
+
     /* Prepare space for hosting multiple extradata. */
     sc->extradata = av_mallocz_array(entries, sizeof(*sc->extradata));
     if (!sc->extradata)

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to