summaryrefslogtreecommitdiff
path: root/libavcodec/mpc8.c
diff options
context:
space:
mode:
authorLaurent Aimar <fenrir@videolan.org>2011-09-25 20:06:20 +0000
committerJanne Grunau <janne-libav@jannau.net>2011-10-07 17:15:45 +0200
commit9bd854b1ff342f82efa6d2ad4e8fefddce5fa731 (patch)
treec52c035cc32bb60b831416fcbe2a369519a1f413 /libavcodec/mpc8.c
parent7d17a794f0348ba40d5cda7d969564cb83981001 (diff)
mpc8: Check out of bound bands limit
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
Diffstat (limited to 'libavcodec/mpc8.c')
-rw-r--r--libavcodec/mpc8.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c
index a126fc8a8f..b38664215b 100644
--- a/libavcodec/mpc8.c
+++ b/libavcodec/mpc8.c
@@ -266,6 +266,8 @@ static int mpc8_decode_frame(AVCodecContext * avctx,
maxband = c->last_max_band + get_vlc2(gb, band_vlc.table, MPC8_BANDS_BITS, 2);
if(maxband > 32) maxband -= 33;
}
+ if(maxband > c->maxbands)
+ return AVERROR_INVALIDDATA;
c->last_max_band = maxband;
/* read subband indexes */