Module: libav
Branch: release/0.8
Commit: 42fed7f433e6d2167ffd4aae31905b583a53b988

Author:    Luca Barbato <[email protected]>
Committer: Reinhard Tartler <[email protected]>
Date:      Wed May 22 12:51:42 2013 +0200

wavpack: check packet size early

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: [email protected]
(cherry picked from commit fd06291239c1bb616bf303b5696cc432710b2530)

Signed-off-by: Reinhard Tartler <[email protected]>

---

 libavcodec/wavpack.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index 7ceb947..59d735f 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -1171,6 +1171,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;
 

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to