[libav-devel] [PATCH] mpc8: Check out of bound bands limit
Måns Rullgård
mans at mansr.com
Fri Oct 7 17:12:23 CEST 2011
Janne Grunau <janne-libav at jannau.net> writes:
> libavcodec/mpc8.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c
> index a126fc8..4cdc99c 100644
> --- a/libavcodec/mpc8.c
> +++ b/libavcodec/mpc8.c
> @@ -127,6 +127,8 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx)
>
> skip_bits(&gb, 3);//sample rate
> c->maxbands = get_bits(&gb, 5) + 1;
> + if (c->maxbands > BANDS)
> + return AVERROR_INVALIDDATA;
This can never happen.
--
Måns Rullgård
mans at mansr.com
More information about the libav-devel
mailing list