diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-06-30 22:01:22 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-09-09 13:37:20 +0200 |
commit | 41049b0d76decc07dc36f1158c748be9f1c19093 (patch) | |
tree | 601a4d5aab7960d62b9c2c59f716e642d5e912e2 | |
parent | bf0b15d76a91b1f885dc17b776246986399a1933 (diff) | |
download | ffmpeg-41049b0d76decc07dc36f1158c748be9f1c19093.tar.gz |
avcodec/apedec: Fix undefined integer overflow with 24bit
Fixes: signed integer overflow: 8683744 * 256 cannot be represented in type 'int'
Fixes: 23527/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5679885932822528
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 9f7b252cdf2d0e0f79d16dc7cd575d1884239863)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-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 93e9a18e5d..3bec1eee68 100644 --- a/libavcodec/apedec.c +++ b/libavcodec/apedec.c @@ -1543,7 +1543,7 @@ static int ape_decode_frame(AVCodecContext *avctx, void *data, for (ch = 0; ch < s->channels; ch++) { sample24 = (int32_t *)frame->data[ch]; for (i = 0; i < blockstodecode; i++) - *sample24++ = s->decoded[ch][i] * 256; + *sample24++ = s->decoded[ch][i] * 256U; } break; } |