aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-06-06 16:01:16 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-06-18 16:05:23 +0200
commite8aa646e4a23a77a7b47ff6c563092a95c1c258a (patch)
tree51baecf822c02d7ff0bb1454dce93b5fa1a8f4a2
parent79f0677332c3ca619b6bd192df13106a6235378e (diff)
downloadffmpeg-e8aa646e4a23a77a7b47ff6c563092a95c1c258a.tar.gz
avcodec/takdec: Fix multiple runtime error: signed integer overflow: 637072 * 4096 cannot be represented in type 'int'
Fixes: 2079/clusterfuzz-testcase-minimized-5345861779324928 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit e4efd41b83e78c7f2ee3e74bee90226110743a8e) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/takdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/takdec.c b/libavcodec/takdec.c
index a05b50ac5c..66983d67c9 100644
--- a/libavcodec/takdec.c
+++ b/libavcodec/takdec.c
@@ -860,7 +860,7 @@ static int tak_decode_frame(AVCodecContext *avctx, void *data,
if (s->sample_shift[chan] > 0)
for (i = 0; i < s->nb_samples; i++)
- decoded[i] *= 1 << s->sample_shift[chan];
+ decoded[i] *= 1U << s->sample_shift[chan];
}
}
@@ -902,7 +902,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] *= 1 << 8;
+ samples[i] *= 1U << 8;
}
break;
}