aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-05 18:01:25 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-20 03:41:33 +0200
commit2197423ec96eb124437b8fd1e8aa4ffb7c4fb74a (patch)
treee0b821750b4bf297f8c28ec7921138aeece0004d
parente9242134920aad4e44174f50b42f651cb5c013b6 (diff)
downloadffmpeg-2197423ec96eb124437b8fd1e8aa4ffb7c4fb74a.tar.gz
avcodec/wnv1: Fix runtime error: left shift of negative value -1
Fixes: 1338/clusterfuzz-testcase-minimized-6485546354343936 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 9fac508ca46f93450ec232299dfd15ac70b6f326) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/wnv1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wnv1.c b/libavcodec/wnv1.c
index 9ff99b2f98..126c01a02d 100644
--- a/libavcodec/wnv1.c
+++ b/libavcodec/wnv1.c
@@ -52,7 +52,7 @@ static inline int wnv1_get_code(WNV1Context *w, int base_value)
if (v == 15)
return ff_reverse[get_bits(&w->gb, 8 - w->shift)];
else
- return base_value + ((v - 7) << w->shift);
+ return base_value + ((v - 7U) << w->shift);
}
static int decode_frame(AVCodecContext *avctx,