diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-06-18 14:37:19 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-06-18 15:17:14 +0200 |
commit | 5aa7d228cbad009939f8d4d6739bb456472a0297 (patch) | |
tree | 0f15c85b35a2e91d25c91c78636d412ca3394534 /libavcodec | |
parent | 0aa14c7f67b2483b76a685a5ed16ea44ec921f37 (diff) | |
download | ffmpeg-5aa7d228cbad009939f8d4d6739bb456472a0297.tar.gz |
avcodec/takdec: Fixes: integer overflow in AV_SAMPLE_FMT_U8P output
Fixes: runtime error: signed integer overflow: 2147483543 + 128 cannot be represented in type 'int'
Fixes: 2234/clusterfuzz-testcase-minimized-6266896041115648
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 27c20068054d8c6786833234f7b6db19f1e98362)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/takdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/takdec.c b/libavcodec/takdec.c index 97cdb622c8..fd4c6483d2 100644 --- a/libavcodec/takdec.c +++ b/libavcodec/takdec.c @@ -884,7 +884,7 @@ static int tak_decode_frame(AVCodecContext *avctx, void *data, uint8_t *samples = (uint8_t *)frame->extended_data[chan]; int32_t *decoded = s->decoded[chan]; for (i = 0; i < s->nb_samples; i++) - samples[i] = decoded[i] + 0x80; + samples[i] = decoded[i] + 0x80U; } break; case AV_SAMPLE_FMT_S16P: |