aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-06-16 15:55:55 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-11-14 23:30:37 +0100
commit5a49cad78aa6920a166f057e74d7ffa219cb0781 (patch)
tree9047de5d65c661b82de8514233011397688805dc
parent7887aa79de9c78ff56934ce4ece2df74b75f718a (diff)
downloadffmpeg-5a49cad78aa6920a166f057e74d7ffa219cb0781.tar.gz
avcodec/tta: Fix undefined shift
Fixes: left shift of negative value -4483 Fixes: 15256/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TTA_fuzzer-5738691617619968 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 ebccd2f778a861b41ad38a8464ea120d4f16b2d7) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/tta.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/tta.c b/libavcodec/tta.c
index 8f097b3bcc..c7702610b6 100644
--- a/libavcodec/tta.c
+++ b/libavcodec/tta.c
@@ -372,7 +372,7 @@ static int tta_decode_frame(AVCodecContext *avctx, void *data,
// shift samples for 24-bit sample format
int32_t *samples = (int32_t *)frame->data[0];
for (i = 0; i < framelen * s->channels; i++)
- *samples++ <<= 8;
+ *samples++ *= 256;
// reset decode buffer
s->decode_buffer = NULL;
break;