diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-02-21 03:05:32 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-14 12:20:15 +0200 |
commit | e2b46de961684fefa9a51f7c101c6883d04ca1d1 (patch) | |
tree | 5236917c9ae0f6845a0da655341427f7a092f2c8 /libavcodec/rv40.c | |
parent | 297b077b49c2bab25f98cf197d51cb023c0f2101 (diff) | |
download | ffmpeg-e2b46de961684fefa9a51f7c101c6883d04ca1d1.tar.gz |
avcodec/rv40: Fix runtime error: left shift of negative value
Fixes: 630/clusterfuzz-testcase-6608718928019456
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 956472a3236cc8eaeba5147c55b51bde6005c898)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/rv40.c')
-rw-r--r-- | libavcodec/rv40.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/rv40.c b/libavcodec/rv40.c index e5ba215b68..dfeebda838 100644 --- a/libavcodec/rv40.c +++ b/libavcodec/rv40.c @@ -189,7 +189,7 @@ static int rv40_decode_intra_types(RV34DecContext *r, GetBitContext *gb, int8_t A = ptr[-r->intra_types_stride + 1]; // it won't be used for the last coefficient in a row B = ptr[-r->intra_types_stride]; C = ptr[-1]; - pattern = A + (B << 4) + (C << 8); + pattern = A + B * (1 << 4) + C * (1 << 8); for(k = 0; k < MODE2_PATTERNS_NUM; k++) if(pattern == rv40_aic_table_index[k]) break; |