diff options
author | Thomas Guilbert <tguilbert@google.com> | 2016-05-27 15:50:25 -0700 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-05-29 00:58:15 +0200 |
commit | 1a82d2cf8fb6a7e854e7548dfcf73c3d046b34ac (patch) | |
tree | bbab20221fd8547b77c4e97619d94ef5a48d8874 /libavformat/oggparseopus.c | |
parent | c1ed78a591f68f3c81eded0bfaac313937ffa3b6 (diff) | |
download | ffmpeg-1a82d2cf8fb6a7e854e7548dfcf73c3d046b34ac.tar.gz |
avformat/oggparseopus: Fix Undefined behavior in oggparseopus.c and libavformat/utils.c
Fixes: usan_granule_overflow
constant type fix by commiter
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/oggparseopus.c')
-rw-r--r-- | libavformat/oggparseopus.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/oggparseopus.c b/libavformat/oggparseopus.c index 99aa4398dd..f45ad84874 100644 --- a/libavformat/oggparseopus.c +++ b/libavformat/oggparseopus.c @@ -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; } |