aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-02-19 15:09:34 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-14 12:20:15 +0200
commit5ee27f48d77c8a6b145811103904bff3c0dcbcc0 (patch)
tree2618f155e7689b4e045910ccd6363e7eae80e53e /libavcodec
parent758258f567a83865a28b6f1b279c2abb7845c955 (diff)
downloadffmpeg-5ee27f48d77c8a6b145811103904bff3c0dcbcc0.tar.gz
avcodec/wavpacl: Fix runtime error: left shift of negative value -1
Fixes: 607/clusterfuzz-testcase-5108792465293312 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 12eebb845a7fe1ced91606547352cbdd93a2726d) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/wavpack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index 071e2be72c..b7c423f76b 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -682,7 +682,7 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
s->hybrid_bitrate = s->frame_flags & WV_HYBRID_BITRATE;
s->post_shift = bpp * 8 - orig_bpp + ((s->frame_flags >> 13) & 0x1f);
s->hybrid_maxclip = ((1LL << (orig_bpp - 1)) - 1);
- s->hybrid_minclip = ((-1LL << (orig_bpp - 1)));
+ s->hybrid_minclip = ((-1UL << (orig_bpp - 1)));
s->CRC = bytestream2_get_le32(&gb);
// parse metadata blocks