mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
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 ebccd2f778
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
58c95520ee
commit
7b9ca45a43
@ -370,7 +370,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;
|
||||
|
Loading…
Reference in New Issue
Block a user