aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-06 12:05:17 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-17 20:35:19 +0200
commit1e034a9ffe533361acfed1455c6bbe1dd9890643 (patch)
treea517c934f4ead5ece8f413706438a0f5d174dd4b
parent93702fd208c6550d89a77d5afc506a2eea2260b3 (diff)
downloadffmpeg-1e034a9ffe533361acfed1455c6bbe1dd9890643.tar.gz
avcodec/mlpdec: Fix runtime error: left shift of negative value -22
Fixes: 1355/clusterfuzz-testcase-minimized-6662205472768000 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 c535436cbeeab89be64e9f3fd652bc736f2f3245) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/mlpdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
index c93b058dd7..7cad5d1cad 100644
--- a/libavcodec/mlpdec.c
+++ b/libavcodec/mlpdec.c
@@ -264,7 +264,7 @@ static inline int read_huff_channels(MLPDecodeContext *m, GetBitContext *gbp,
result = (result << lsb_bits) + get_bits(gbp, lsb_bits);
result += cp->sign_huff_offset;
- result <<= quant_step_size;
+ result *= 1 << quant_step_size;
m->sample_buffer[pos + s->blockpos][channel] = result;
}