On 21/04/15 14:44, Luca Barbato wrote:
> ---
> libavcodec/hq_hqa.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/libavcodec/hq_hqa.c b/libavcodec/hq_hqa.c
> index 4b18eae..52fe7db 100644
> --- a/libavcodec/hq_hqa.c
> +++ b/libavcodec/hq_hqa.c
> @@ -75,7 +75,10 @@ static int hq_decode_block(HQContext *c, GetBitContext
> *gb, int16_t block[64],
> }
>
> for (;;) {
> - val = get_vlc2(gb, c->hq_ac_vlc.table, 9, 2);
> + val = get_vlc2(gb, c->hq_ac_vlc.table, 9, 2);
> + if (val < 0)
> + return AVERROR_INVALIDDATA;
> +
> pos += ff_hq_ac_skips[val];
> if (pos >= 64)
> break;
> @@ -180,6 +183,8 @@ static int hqa_decode_mb(HQContext *c, AVFrame *pic, int
> qgroup,
> int i, ret, cbp;
>
> cbp = get_vlc2(gb, c->hqa_cbp_vlc.table, 5, 1);
> + if (cbq < 0)
> + return AVERROR_INVALIDATA;
>
> for (i = 0; i < 12; i++)
> memset(c->block[i], 0, sizeof(*c->block));
>
Ignore the typos
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel