Commit d8a1eb11 authored by Michael Niedermayer's avatar Michael Niedermayer

wavpack: check the blocks sample count, fix out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 580021cf
......@@ -806,6 +806,10 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
*got_frame_ptr = 0;
return 0;
}
if (s->samples > wc->samples) {
av_log(avctx, AV_LOG_ERROR, "too many samples in block");
return -1;
}
} else {
s->samples = wc->samples;
}
......
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