diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-02-25 21:07:25 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-14 12:20:15 +0200 |
commit | 5d21cfb1707f1161f1e2fdf0a9df8a025eee3b96 (patch) | |
tree | f2c9ad4360c0c4585649368da375e928b51cf68c | |
parent | 842c0b9f59f98de1504f1c42020dc808e09c1bac (diff) | |
download | ffmpeg-5d21cfb1707f1161f1e2fdf0a9df8a025eee3b96.tar.gz |
avcodec/eac3dec: Fix runtime error: left shift of negative value -3
Fixes: 672/clusterfuzz-testcase-5595018867769344
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 87eb3749708c0eb2978f4812c7be2a4af667fdb7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/eac3dec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/eac3dec.c b/libavcodec/eac3dec.c index be2350237e..c971879b2d 100644 --- a/libavcodec/eac3dec.c +++ b/libavcodec/eac3dec.c @@ -280,7 +280,7 @@ static void ff_eac3_decode_transform_coeffs_aht_ch(AC3DecodeContext *s, int ch) mant += ((ff_eac3_gaq_remap_2_4_a[hebap-8][log_gain-1] * (int64_t)mant) >> 15) + b; } else { /* small mantissa, no GAQ, or Gk=1 */ - mant <<= 24 - bits; + mant *= (1 << 24 - bits); if (!log_gain) { /* remap mantissa value for no GAQ or Gk=1 */ mant += (ff_eac3_gaq_remap_1[hebap-8] * (int64_t)mant) >> 15; |