OSDN Git Service

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>
Wed, 22 Apr 2015 10:27:23 +0000 (12:27 +0200)
commit3f5a2831744c3e55261ca5e2a6d05f7a87143b33
tree09c3ca1b33a71e58e33b03f9d000924a158a1b60
parent66a1ed96bf3d5a6755a24769f29075618ec6131a
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