提交 ed506730 编写于 作者: L Luca Barbato

wavpack: validate samples size parsed in wavpack_decode_block

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
上级 8c345581
......@@ -796,6 +796,9 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
if (!wc->mkv_mode) {
s->samples = AV_RL32(buf);
buf += 4;
if (s->samples != wc->samples)
return AVERROR_INVALIDDATA;
if (!s->samples) {
*got_frame_ptr = 0;
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册