X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Foggparseopus.c;h=f45ad848744a47934928345887de68aedb7d7e13;hb=b5bc436ebc57ec60d87f86008a1888fbfb4099bc;hp=8191b1083ca2041fef387be76270d5a37a4b6161;hpb=f8d1bb2f2ce9031940019e1cda4d30bc409ee349;p=ffmpeg diff --git a/libavformat/oggparseopus.c b/libavformat/oggparseopus.c index 8191b1083ca..f45ad848744 100644 --- a/libavformat/oggparseopus.c +++ b/libavformat/oggparseopus.c @@ -117,6 +117,10 @@ static int opus_packet(AVFormatContext *avf, int idx) if (!os->psize) return AVERROR_INVALIDDATA; + if (os->granule > (1LL << 62)) { + av_log(avf, AV_LOG_ERROR, "Unsupported huge granule pos %"PRId64 "\n", os->granule); + return AVERROR_INVALIDDATA; + } if ((!os->lastpts || os->lastpts == AV_NOPTS_VALUE) && !(os->flags & OGG_FLAG_EOS)) { int seg, d;