[FFmpeg-cvslog] avcodec/eac3dec: Fix runtime error: left shift of negative value -3

Michael Niedermayer git at videolan.org
Sun Feb 26 18:16:52 EET 2017


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Feb 25 21:07:25 2017 +0100| [87eb3749708c0eb2978f4812c7be2a4af667fdb7] | committer: Michael Niedermayer

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 at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=87eb3749708c0eb2978f4812c7be2a4af667fdb7
---

 libavcodec/eac3dec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/eac3dec.c b/libavcodec/eac3dec.c
index be23502..c971879 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;



More information about the ffmpeg-cvslog mailing list