diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-03-12 23:45:54 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-03-14 02:23:50 +0100 |
commit | 1467143a6ebf08a16ec0b833ae462f88345828bd (patch) | |
tree | 112129275ef391ee87dcdb2ea7aa82c0558b1e0a /libavcodec/wavpack.h | |
parent | a557ae8d52ce1cfaf3be5cdb13728b7b2b9512b9 (diff) | |
download | ffmpeg-1467143a6ebf08a16ec0b833ae462f88345828bd.tar.gz |
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@niedermayer.cc>
Diffstat (limited to 'libavcodec/wavpack.h')
-rw-r--r-- | libavcodec/wavpack.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wavpack.h b/libavcodec/wavpack.h index 445d593c3b..c949390f51 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; |