summaryrefslogtreecommitdiff
path: root/libavcodec/wavpack.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-23 10:55:00 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-23 10:55:46 +0200
commitb7d16dc4bd21874558b63b6d8a50d6c2ed4aba90 (patch)
tree6da0a45cfda484147a5f6bad9f1155f49c64af78 /libavcodec/wavpack.c
parent402bec52d4d3dd7575fa502f59de30a88983d1c6 (diff)
parentfd06291239c1bb616bf303b5696cc432710b2530 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: wavpack: check packet size early Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/wavpack.c')
-rw-r--r--libavcodec/wavpack.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index 3efb881dc7..1edde83b96 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -1216,6 +1216,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;