From 9166f483c52e7e0a031a7bb149bea16aaa72f344 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 14 Apr 2012 13:13:32 +0200 Subject: wmaprodec: check min_samples_per_subframe Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer --- libavcodec/wmaprodec.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libavcodec/wmaprodec.c') diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c index aa06826..8e7ef4c 100644 --- a/libavcodec/wmaprodec.c +++ b/libavcodec/wmaprodec.c @@ -335,6 +335,12 @@ static av_cold int decode_init(AVCodecContext *avctx) return AVERROR_INVALIDDATA; } + if (s->min_samples_per_subframe < (1<min_samples_per_subframe); + return AVERROR_INVALIDDATA; + } + s->num_channels = avctx->channels; if (s->num_channels < 0) { -- cgit v1.1