aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-06-09 13:49:30 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-06-16 20:32:39 +0200
commit16d6cc2168b66c75a5dfe772d778360c2c8f3f5a (patch)
treee77969b215e9ff096933d4b3b9ecc120d5dbb508 /libavcodec
parente77ddd31a8e14bcf5eccd6008d866ae90b4b0d4c (diff)
downloadffmpeg-16d6cc2168b66c75a5dfe772d778360c2c8f3f5a.tar.gz
avcodec/wavpack: Change wp_log2() to unsigned
Fixes: runtime error: signed integer overflow: 2143315325 + 4186162 cannot be represented in type 'int' Fixes: 2134/clusterfuzz-testcase-minimized-4619258405322752 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/wavpack.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wavpack.h b/libavcodec/wavpack.h
index 053b1c575d..3ae601f914 100644
--- a/libavcodec/wavpack.h
+++ b/libavcodec/wavpack.h
@@ -177,7 +177,7 @@ static av_always_inline int wp_exp2(int16_t val)
return neg ? -res : res;
}
-static av_always_inline int wp_log2(int32_t val)
+static av_always_inline int wp_log2(uint32_t val)
{
int bits;