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

Michael Niedermayer git at videolan.org
Wed May 17 03:56:12 EEST 2017


ffmpeg | branch: release/3.1 | Michael Niedermayer <michael at niedermayer.cc> | Wed May 17 00:53:32 2017 +0200| [63cc52ed97f57ae47f47118ee84ac3877c591b82] | committer: Michael Niedermayer

avcodec/mlpdec: Fix runtime error: left shift of negative value -1

Fixes: 1636/clusterfuzz-testcase-minimized-5310494757879808

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

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

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

diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
index fa4347fb23..eaf1aa7c75 100644
--- a/libavcodec/mlpdec.c
+++ b/libavcodec/mlpdec.c
@@ -701,7 +701,7 @@ static int read_filter_params(MLPDecodeContext *m, GetBitContext *gbp,
             /* TODO: Check validity of state data. */
 
             for (i = 0; i < order; i++)
-                fp->state[i] = state_bits ? get_sbits(gbp, state_bits) << state_shift : 0;
+                fp->state[i] = state_bits ? get_sbits(gbp, state_bits) * (1 << state_shift) : 0;
         }
     }
 



More information about the ffmpeg-cvslog mailing list