Commit fd062912 authored by Luca Barbato's avatar Luca Barbato

wavpack: check packet size early

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
parent 3f0b6d7a
......@@ -1203,6 +1203,9 @@ static int wavpack_decode_frame(AVCodecContext *avctx, void *data,
int frame_size, ret, frame_flags;
int samplecount = 0;
if (avpkt->size < 12 + s->multichannel * 4)
return AVERROR_INVALIDDATA;
s->block = 0;
s->ch_offset = 0;
......
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