aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-08-10 23:09:42 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-11-15 12:25:45 +0100
commitdbc9f38aac161de909d55c534f6b7721fa33a9e1 (patch)
tree195f8158d8439d316a5b5c66cc8d2d0ec3caa542 /libavcodec
parente80c90eadba45349f89d85a1048cf08e95158c90 (diff)
downloadffmpeg-dbc9f38aac161de909d55c534f6b7721fa33a9e1.tar.gz
avcodec/mpc8: Fix 32bit mask/enum
Fixes: left shift of 1 by 31 places cannot be represented in type 'int' Fixes: 15817/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPC8_fuzzer-5636626409062400 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit e8bb949ade4078ca318a9b3475cb7a6cfc7e4639) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpc8.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c
index 7e172a2181..faa22fce9a 100644
--- a/libavcodec/mpc8.c
+++ b/libavcodec/mpc8.c
@@ -62,7 +62,7 @@ static inline int mpc8_dec_enum(GetBitContext *gb, int k, int n)
do {
n--;
if (code >= C[n]) {
- bits |= 1 << n;
+ bits |= 1U << n;
code -= C[n];
C -= 32;
k--;