1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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>
This commit is contained in:
Michael Niedermayer 2017-05-05 18:01:25 +02:00
parent 3c085c1ba5
commit 9fac508ca4

View File

@ -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,