webp: validate the distance prefix code
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Mon, 2 Mar 2015 19:47:57 +0000 (20:47 +0100)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Sun, 8 Mar 2015 19:36:18 +0000 (19:36 +0000)
commit61c966ef30129a0e4dba485242c039a895914d33
tree1e8b6ed248c8ede49dc9a0e7cb7bba03130760e1
parent772f50c1f3e4a50ce3f35e31a6f0cd64e7cbe818
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: Anton Khirnov <anton@khirnov.net>
libavcodec/webp.c