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:21:49 +0000 (19:21 +0000)
commit905172d75c9cfd93c757b09fa4b8afa0e926a13c
tree7f4c8192e6f5ad9da02e8ded03e9af2d590dca9d
parent8aee35acb1b40e51a4fc8d7f7c561088e25d6d2e
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