[FFmpeg-cvslog] avcodec/wavpack: Fix runtime error: shift exponent 137 is too large for 32-bit type 'int'

Michael Niedermayer git at videolan.org
Tue Mar 14 03:25:48 EET 2017


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun Mar 12 23:45:54 2017 +0100| [1467143a6ebf08a16ec0b833ae462f88345828bd] | committer: Michael Niedermayer

avcodec/wavpack: Fix runtime error: shift exponent 137 is too large for 32-bit type 'int'

Fixes: 808/clusterfuzz-testcase-4715513349406720

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

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

diff --git a/libavcodec/wavpack.h b/libavcodec/wavpack.h
index 445d593..c949390 100644
--- a/libavcodec/wavpack.h
+++ b/libavcodec/wavpack.h
@@ -171,7 +171,7 @@ static av_always_inline int wp_exp2(int16_t val)
 
     res   = wp_exp2_table[val & 0xFF] | 0x100;
     val >>= 8;
-    if (val > 31)
+    if (val > 31U)
         return INT_MIN;
     res   = (val > 9) ? (res << (val - 9)) : (res >> (9 - val));
     return neg ? -res : res;



More information about the ffmpeg-cvslog mailing list