mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-04 14:22:12 +00:00
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>
This commit is contained in:
parent
c217ca7718
commit
7cee3b3718
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user