filmstripdec: avoid integer overflow
authorVittorio Giovara <vittorio.giovara@gmail.com>
Fri, 24 Oct 2014 12:15:39 +0000 (13:15 +0100)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Mon, 27 Oct 2014 18:21:40 +0000 (18:21 +0000)
CC: libav-stable@libav.org
Bug-Id: CID 732246

libavformat/filmstripdec.c

index 3fa6842..e4dee11 100644 (file)
@@ -84,7 +84,7 @@ static int read_packet(AVFormatContext *s,
         return AVERROR(EIO);
     pkt->dts = avio_tell(s->pb) / (st->codec->width * (st->codec->height + film->leading) * 4);
     pkt->size = av_get_packet(s->pb, pkt, st->codec->width * st->codec->height * 4);
-    avio_skip(s->pb, st->codec->width * film->leading * 4);
+    avio_skip(s->pb, st->codec->width * (int64_t) film->leading * 4);
     if (pkt->size < 0)
         return pkt->size;
     pkt->flags |= AV_PKT_FLAG_KEY;