diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-12-26 18:55:08 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-09-10 16:04:26 +0200 |
commit | 273f53e57d92ebe24ff85c1ac4b5b7a9839c97f9 (patch) | |
tree | 5848d0e0cb89a4e739e2f7e614e0c456f56e8ad8 | |
parent | 53da7366456a4e595e649306a8f537d0f50c3604 (diff) | |
download | ffmpeg-273f53e57d92ebe24ff85c1ac4b5b7a9839c97f9.tar.gz |
avcodec/alsdec: Fix integer overflow with quant_cof
Fixes: signed integer overflow: -210824 * 16384 cannot be represented in type 'int'
Fixes: 28670/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-5682310846480384
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 7ce40dde03ea56684f2cb6b40991a90bc38c3ad9)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/alsdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index 3819307fbf..0fd7278ad8 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -761,7 +761,7 @@ static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd) } for (k = 2; k < opt_order; k++) - quant_cof[k] = (quant_cof[k] * (1 << 14)) + (add_base << 13); + quant_cof[k] = (quant_cof[k] * (1U << 14)) + (add_base << 13); } } |