summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/wavpack.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index cfcd22d9f6..e6e9872491 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -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;