diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-06-30 22:01:22 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-07-07 19:30:22 +0200 |
commit | efe225d30774e0dfba11a77e1d53915a57cce7f8 (patch) | |
tree | 490e2f34142b0b0d1345f53e332dc576757eef41 | |
parent | a9fba357e5da41db41aa6d33efd5d8f9ffe49574 (diff) | |
download | ffmpeg-efe225d30774e0dfba11a77e1d53915a57cce7f8.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 c00b53e675..06c4b79701 100644 --- a/libavcodec/apedec.c +++ b/libavcodec/apedec.c @@ -1535,7 +1535,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; } |