diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-03-15 02:57:24 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-15 02:57:24 +0100 |
commit | 3b63819dfbeefe8656c816e2dcdba548ff6dfb35 (patch) | |
tree | dc52829d5da009e622d83fbdbdce2c29a4d16c05 /libavcodec/vc1.c | |
parent | b8535b273fcbf83c8aeffa3d6cae54882eaed364 (diff) | |
download | ffmpeg-3b63819dfbeefe8656c816e2dcdba548ff6dfb35.tar.gz |
avcodec/vc1: Fix undefined shifts
Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vc1.c')
-rw-r--r-- | libavcodec/vc1.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index 22eb358dae..a84522c130 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -572,13 +572,13 @@ int ff_vc1_decode_entry_point(AVCodecContext *avctx, VC1Context *v, GetBitContex int scale, shift, i; \ if (!lumscale) { \ scale = -64; \ - shift = (255 - lumshift * 2) << 6; \ + shift = (255 - lumshift * 2) * 64; \ if (lumshift > 31) \ shift += 128 << 6; \ } else { \ scale = lumscale + 32; \ if (lumshift > 31) \ - shift = (lumshift - 64) << 6; \ + shift = (lumshift - 64) * 64; \ else \ shift = lumshift << 6; \ } \ |