diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-12-23 20:39:14 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2022-04-06 20:27:35 +0200 |
commit | 6c5e26821e075e55fa398cf8a52f833cc1316148 (patch) | |
tree | 7fe56881225806920ed30f7c270e694464d02d77 /libavcodec | |
parent | be0109b881e688616ccac6551762e1a692befe11 (diff) | |
download | ffmpeg-6c5e26821e075e55fa398cf8a52f833cc1316148.tar.gz |
avcodec/apedec: fix integer overflow in 8bit samples
Fixes: signed integer overflow: 2147483542 + 128 cannot be represented in type 'int'
Fixes: 42812/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-6344057861832704
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 7cee3b37187dbf61dbebff023f07ceedfc0129bb)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/apedec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c index 0fb3b04db5..e2885891a8 100644 --- a/libavcodec/apedec.c +++ b/libavcodec/apedec.c @@ -1587,7 +1587,7 @@ static int ape_decode_frame(AVCodecContext *avctx, void *data, for (ch = 0; ch < s->channels; ch++) { sample8 = (uint8_t *)frame->data[ch]; for (i = 0; i < blockstodecode; i++) - *sample8++ = (s->decoded[ch][i] + 0x80) & 0xff; + *sample8++ = (s->decoded[ch][i] + 0x80U) & 0xff; } break; case 16: |