aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-04-27 02:27:16 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-14 12:20:15 +0200
commit50cd472ce6d75eda8faef18698c14eea6587b907 (patch)
treee6cb9a8e9daafd4cbd4d66600989b0901c235767 /libavcodec
parent8fb0b9ae355053e699f1e0c313d9fceeb883c824 (diff)
downloadffmpeg-50cd472ce6d75eda8faef18698c14eea6587b907.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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c
index 1cc4ca4742..42bd561cd7 100644
--- a/libavcodec/mdec.c
+++ b/libavcodec/mdec.c
@@ -73,7 +73,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;