diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-04-27 02:27:16 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-20 03:41:33 +0200 |
commit | 37f5bfaa2b0ad1918fe86e9edb13b0a23ac2838b (patch) | |
tree | 49adcc5aa4cd6939b9a3dbd47a4615f4dcb30252 /libavcodec | |
parent | d1b23e5c0c6cd15e216f22c314111f1095359b03 (diff) | |
download | ffmpeg-37f5bfaa2b0ad1918fe86e9edb13b0a23ac2838b.tar.gz |
avcodec/mdec: Fix runtime error: left shift of negative value -127
Fixes undefined behavior
Fixes: 1275/clusterfuzz-testcase-minimized-6718162017976320
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 6ca82975b7a8eaf676a52738ec8e7e36732327cc)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c index ee96614772..17109d9a93 100644 --- a/libavcodec/mdec.c +++ b/libavcodec/mdec.c @@ -74,7 +74,7 @@ static inline int mdec_decode_block_intra(MDECContext *a, int16_t *block, int n) if (diff >= 0xffff) return AVERROR_INVALIDDATA; a->last_dc[component] += diff; - block[0] = a->last_dc[component] << 3; + block[0] = a->last_dc[component] * (1 << 3); } i = 0; |