avcodec/webp: validate the distance prefix code
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Mon, 2 Mar 2015 19:47:57 +0000 (20:47 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 2 Mar 2015 23:37:36 +0000 (00:37 +0100)
commit5de2dab12b951b2fe121eb18503accfc91cd1565
treeda399e23e357746e9ed1c4e4cab25dee8ca1f948
parentda2a49ac9ab55c857fe4116c0996728c49e2be77
avcodec/webp: validate the distance prefix code

According to the WebP Lossless Bitstream Specification the highest
allowed value for a prefix code is 39.

If prefix_code is too large, the calculated extra_bits has an invalid
value and triggers an assertion in get_bits.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/webp.c