diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-06-28 00:21:09 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-07-01 12:49:26 +0200 |
commit | bf3757f54b3fd8e4277286cd3b9f70701d564222 (patch) | |
tree | 08b691b92f0ced368fae732f043cb38359217eb3 | |
parent | 056f59ad2cbfec4bfec9b401bc4f6b71f66302b2 (diff) | |
download | ffmpeg-bf3757f54b3fd8e4277286cd3b9f70701d564222.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.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/common.h b/libavutil/common.h index 58ead80514..735a22221a 100644 --- a/libavutil/common.h +++ b/libavutil/common.h @@ -307,7 +307,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); } /** |