diff options
author | Thomas Guilbert <tguilbert@google.com> | 2016-05-27 15:50:25 -0700 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-06-05 02:40:31 +0200 |
commit | dab82a2a7c907f0ff842f9a1ce05670cfe6715ab (patch) | |
tree | 28d690a5b3efc36a69afd9f53c2477e55bf8c448 | |
parent | 7f864badc01f92f5861aa57dc954c07977b2f1f4 (diff) | |
download | android_external_ffmpeg-dab82a2a7c907f0ff842f9a1ce05670cfe6715ab.tar.gz android_external_ffmpeg-dab82a2a7c907f0ff842f9a1ce05670cfe6715ab.tar.bz2 android_external_ffmpeg-dab82a2a7c907f0ff842f9a1ce05670cfe6715ab.zip |
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>
(cherry picked from commit 1a82d2cf8fb6a7e854e7548dfcf73c3d046b34ac)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-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 584fff4538..8bb2a41366 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; } |