wavpack: check packet size early
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit fd06291239)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
This commit is contained in:
parent
10f77c165c
commit
93fbf034c9
1 changed files with 3 additions and 0 deletions
|
|
@ -1178,6 +1178,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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue