[FFmpeg-cvslog] mpc8: Check out of bound bands limit
Laurent Aimar
git at videolan.org
Mon Mar 19 05:30:29 CET 2012
ffmpeg | branch: release/0.8 | Laurent Aimar <fenrir at videolan.org> | Sun Sep 25 20:06:20 2011 +0000| [59050c0629870d3261b6e686725759e667e4e91f] | committer: Reinhard Tartler
mpc8: Check out of bound bands limit
Signed-off-by: Janne Grunau <janne-libav at jannau.net>
(cherry picked from commit 9bd854b1ff342f82efa6d2ad4e8fefddce5fa731)
Signed-off-by: Anton Khirnov <anton at khirnov.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=59050c0629870d3261b6e686725759e667e4e91f
---
libavcodec/mpc8.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c
index 85c6621..e4d7ac1 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 */
More information about the ffmpeg-cvslog
mailing list