Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-12-23 22:39:14 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2022-04-14 00:39:50 +0300
commit0190d175c6f6301458daadd1aae6c9ae83678ec7 (patch)
tree7de0799d438fa3813e21e795a29cda64f7968707 /libavcodec
parent83778e7787ca07f88f3f4718719c2dbfa363a0fb (diff)
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index 9e3756fc32..8a54c750b5 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -1529,7 +1529,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: