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

Michael Niedermayer git at videolan.org
Wed May 17 02:37:53 EEST 2017


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Wed May 17 00:44:36 2017 +0200| [99c4c76cfbc4ae56dc8c37f5fab02f88f6b2cb48] | committer: Michael Niedermayer

avcodec/takdec: Fix  runtime error: left shift of negative value -42

Fixes: 1635/clusterfuzz-testcase-minimized-4992749856096256

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

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

diff --git a/libavcodec/takdec.c b/libavcodec/takdec.c
index 42939b4058..31d703135a 100644
--- a/libavcodec/takdec.c
+++ b/libavcodec/takdec.c
@@ -904,7 +904,7 @@ static int tak_decode_frame(AVCodecContext *avctx, void *data,
         for (chan = 0; chan < avctx->channels; chan++) {
             int32_t *samples = (int32_t *)frame->extended_data[chan];
             for (i = 0; i < s->nb_samples; i++)
-                samples[i] <<= 8;
+                samples[i] *= 1 << 8;
         }
         break;
     }



More information about the ffmpeg-cvslog mailing list