[FFmpeg-cvslog] avcodec/aacdec_fixed: Fix undefined shift

Michael Niedermayer git at videolan.org
Thu Feb 1 01:51:28 EET 2018


ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Sun Nov  5 21:20:07 2017 +0100| [b0c2e6e2d240c458a0455cfcddaacfb927d22e7c] | committer: Michael Niedermayer

avcodec/aacdec_fixed: Fix undefined shift

Fixes: runtime error: left shift of negative value -801112064
Fixes: 3492/clusterfuzz-testcase-minimized-5784775283441664

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit fca198fb5bf42ba6b765b3f75b11738e4b4fc2a9)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

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

diff --git a/libavcodec/aacdec_fixed.c b/libavcodec/aacdec_fixed.c
index f9df4197c5..539f9eefbc 100644
--- a/libavcodec/aacdec_fixed.c
+++ b/libavcodec/aacdec_fixed.c
@@ -308,7 +308,7 @@ static av_always_inline void predict(PredictorState *ps, int *coef,
             if (shift > 0) {
                 *coef += (unsigned)((pv.mant + (1 << (shift - 1))) >> shift);
             } else
-                *coef += (unsigned)(pv.mant << -shift);
+                *coef += (unsigned)pv.mant << -shift;
         }
     }
 



More information about the ffmpeg-cvslog mailing list