From b84c9cd6553ab986acc4d0ad30f481322d7af1a0 Mon Sep 17 00:00:00 2001 From: Debian Multimedia Maintainers Date: Tue, 14 Jun 2016 12:13:25 +0000 Subject: [PATCH] CVE-2016-3062 Gbp-Pq: Name CVE-2016-3062.patch --- libavformat/mov.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index a1de652..4e636e7 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -387,8 +387,10 @@ static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom) avio_rb32(pb); // version + flags entries = avio_rb32(pb); - if (entries >= UINT_MAX / sizeof(*sc->drefs)) + if (!entries || + entries >= UINT_MAX / sizeof(*sc->drefs)) return AVERROR_INVALIDDATA; + sc->drefs_count = 0; sc->drefs = av_mallocz(entries * sizeof(*sc->drefs)); if (!sc->drefs) return AVERROR(ENOMEM); -- 2.30.2