mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-03 21:42:09 +00:00
avcodec/apedec: Only clear the needed buffer space, instead of all
Fixes: Timeout (15sec -> 0.4sec) Fixes: 18396/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5730080487112704 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
e1c4ce4761
commit
f17ea02001
@ -1516,7 +1516,7 @@ static int ape_decode_frame(AVCodecContext *avctx, void *data,
|
||||
av_fast_malloc(&s->decoded_buffer, &s->decoded_size, decoded_buffer_size);
|
||||
if (!s->decoded_buffer)
|
||||
return AVERROR(ENOMEM);
|
||||
memset(s->decoded_buffer, 0, s->decoded_size);
|
||||
memset(s->decoded_buffer, 0, decoded_buffer_size);
|
||||
s->decoded[0] = s->decoded_buffer;
|
||||
s->decoded[1] = s->decoded_buffer + FFALIGN(blockstodecode, 8);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user