wavpack: fix out of array access

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/6/merge
Michael Niedermayer 12 years ago
parent 0cbb31a264
commit be818df547
  1. 3
      libavcodec/wavpack.c

@ -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) {

Loading…
Cancel
Save