aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-17 00:44:36 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-08-23 13:15:17 +0200
commit67c4ca66cbe14b2804419cc30b493f757f05ef9a (patch)
tree81503c5028a738deab86e7edf3acabb04cf144ae
parent7ed5234fe13af397fb7b06b4478172c6a138a0a1 (diff)
downloadffmpeg-67c4ca66cbe14b2804419cc30b493f757f05ef9a.tar.gz
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@niedermayer.cc> (cherry picked from commit 99c4c76cfbc4ae56dc8c37f5fab02f88f6b2cb48) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/takdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/takdec.c b/libavcodec/takdec.c
index 2b72e8476c..8670b681ad 100644
--- a/libavcodec/takdec.c
+++ b/libavcodec/takdec.c
@@ -897,7 +897,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;
}