1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00

wavpack: fix out of array access

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-11-12 14:42:45 +01:00
parent 0cbb31a264
commit be818df547

View File

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