aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-06-28 00:21:09 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2020-07-05 01:47:57 +0200
commit0c4fcdead84d9ca22b36e72a0b5ee2228c745a22 (patch)
tree35f771b96ccd51b55f2113df3500e02b063ffe66
parente02303282d5098c725ca710987ed2b79ef93eb5d (diff)
downloadffmpeg-0c4fcdead84d9ca22b36e72a0b5ee2228c745a22.tar.gz
avutil/common: Fix integer overflow in av_ceil_log2_c()
Fixes: left shift of 1913647649 by 1 places cannot be represented in type 'int' Fixes: 23572/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5082619795734528 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit e409262837712016097c187e97bf99aadf6a4cdf) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavutil/common.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/common.h b/libavutil/common.h
index 8db0291170..bad43e426e 100644
--- a/libavutil/common.h
+++ b/libavutil/common.h
@@ -331,7 +331,7 @@ static av_always_inline av_const double av_clipd_c(double a, double amin, double
*/
static av_always_inline av_const int av_ceil_log2_c(int x)
{
- return av_log2((x - 1) << 1);
+ return av_log2((x - 1U) << 1);
}
/**