Commit 1a82d2cf authored by Thomas Guilbert's avatar Thomas Guilbert Committed by Michael Niedermayer

avformat/oggparseopus: Fix Undefined behavior in oggparseopus.c and libavformat/utils.c

Fixes: usan_granule_overflow

constant type fix by commiter
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent c1ed78a5
......@@ -117,7 +117,7 @@ static int opus_packet(AVFormatContext *avf, int idx)
if (!os->psize)
return AVERROR_INVALIDDATA;
if (os->granule > INT64_MAX - UINT32_MAX) {
if (os->granule > (1LL << 62)) {
av_log(avf, AV_LOG_ERROR, "Unsupported huge granule pos %"PRId64 "\n", os->granule);
return AVERROR_INVALIDDATA;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment