[libav-stable] [libav-devel] [PATCH] prores: Reject negative run and level values

Sean McGovern gseanmcg at gmail.com
Thu Jan 9 01:36:38 CET 2014


On Thu, Oct 10, 2013 at 3:03 PM, Luca Barbato <lu_zero at gentoo.org> wrote:

> Sample-Id: 00000611-google
>
> Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
> CC: libav-stable at libav.org
> ---
>  libavcodec/proresdec.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/libavcodec/proresdec.c b/libavcodec/proresdec.c
> index c65d729..144fa26 100644
> --- a/libavcodec/proresdec.c
> +++ b/libavcodec/proresdec.c
> @@ -393,12 +393,16 @@ static inline int decode_ac_coeffs(GetBitContext
> *gb, int16_t *out,
>              return 0;
>
>          run = decode_vlc_codeword(gb,
> ff_prores_ac_codebook[run_cb_index]);
> +        if (run < 0)
> +            return AVERROR_INVALIDDATA;
>
>          bits_left = get_bits_left(gb);
>          if (bits_left <= 0 || (bits_left <= 8 && !show_bits(gb,
> bits_left)))
>              return AVERROR_INVALIDDATA;
>
>          level = decode_vlc_codeword(gb,
> ff_prores_ac_codebook[lev_cb_index]) + 1;
> +        if (level < 0)
> +            return AVERROR_INVALIDDATA;
>
>          pos += run + 1;
>          if (pos >= max_coeffs)
> --
>

Hi,

Just a heads up that this commit broke all the prores tests on release/9.
Verified both on my Solaris 11.1 box and on a PowerPC Linux machine.

-- Sean McG.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libav.org/pipermail/libav-stable/attachments/20140108/993f0184/attachment.html>


More information about the libav-stable mailing list