mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
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 9f7b252cdf
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
a9fba357e5
commit
efe225d307
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user