mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-03 14:32:16 +02:00
wavpack: check packet size early
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
This commit is contained in:
parent
3f0b6d7a62
commit
fd06291239
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user