avcodec/apac: Clean padding space

Fixes: use-of-uninitialized-value
Fixes: 70842/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APAC_fuzzer-5758325067677696

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
release/7.1
Michael Niedermayer 3 months ago
parent cba4e2e40d
commit 8ca072a373
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 1
      libavcodec/apac.c

@ -159,6 +159,7 @@ static int apac_decode(AVCodecContext *avctx, AVFrame *frame,
buf = &s->bitstream[s->bitstream_index];
buf_size += s->bitstream_size;
s->bitstream_size = buf_size;
memset(buf + buf_size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
frame->nb_samples = s->bitstream_size * 16 * 8;
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)

Loading…
Cancel
Save