aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/alsdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-06-21 00:47:16 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-11-11 20:18:46 +0100
commita9e4ef620cb73c7fcf5e055a1f03ab359e358fe7 (patch)
treeec3714f003135f2a491c7a95cd9f1ac4d38a7ff1 /libavcodec/alsdec.c
parentc5fd0c5446d0b73c01b5eb2922af0251bc213b76 (diff)
downloadffmpeg-a9e4ef620cb73c7fcf5e055a1f03ab359e358fe7.tar.gz
avcodec/alsdec: Fixes signed integer overflow in LSB addition
Fixes: signed integer overflow: 8 * 536870912 cannot be represented in type 'int' Fixes: 15281/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-5744458785619968 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 7f527021df73b4792323f38f84a4bf2fbe5a2052) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/alsdec.c')
-rw-r--r--libavcodec/alsdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index 96cfbbf1fe..4b69775414 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -867,7 +867,7 @@ static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd)
res >>= 1;
if (cur_k) {
- res *= 1 << cur_k;
+ res *= 1U << cur_k;
res |= get_bits_long(gb, cur_k);
}
}