[FFmpeg-cvslog] avcodec/wavpack: Change wp_log2() to unsigned

Michael Niedermayer git at videolan.org
Fri Jun 16 23:09:19 EEST 2017


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri Jun  9 13:49:30 2017 +0200| [16d6cc2168b66c75a5dfe772d778360c2c8f3f5a] | committer: Michael Niedermayer

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 at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=16d6cc2168b66c75a5dfe772d778360c2c8f3f5a
---

 libavcodec/wavpack.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
 



More information about the ffmpeg-cvslog mailing list