Commit 9fac508c authored by Michael Niedermayer's avatar Michael Niedermayer

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/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 3c085c1b
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment