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>
Sat, 21 Mar 2015 00:52:52 +0000 (01:52 +0100)
commit1a2aaa74970c63a6cfa7fa966ea3a21e78618849
tree6ca5457c7a39a6e2e55ea57d7f7ad2380720fee4
parentf18fc45d18940b8a4e8489d448654d09717925c4
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>
(cherry picked from commit 5de2dab12b951b2fe121eb18503accfc91cd1565)

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