Commit be818df5 authored by Michael Niedermayer's avatar Michael Niedermayer

wavpack: fix out of array access

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 0cbb31a2
......@@ -1208,11 +1208,12 @@ static int wavpack_decode_frame(AVCodecContext *avctx, void *data,
}
/* get output buffer */
s->frame.nb_samples = s->samples;
s->frame.nb_samples = s->samples + 1;
if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
s->frame.nb_samples = s->samples;
while (buf_size > 0) {
if (!s->multichannel) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment