[lzw] Avoid invalid left shift.
* src/lzw/ftzopen.c (ft_lzwstate_get_code): Limit `num_bits'.
This commit is contained in:
parent
8d7b9198e3
commit
548f68d805
@ -1,3 +1,9 @@
|
||||
2016-08-16 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[lzw] Avoid invalid left shift.
|
||||
|
||||
* src/lzw/ftzopen.c (ft_lzwstate_get_code): Limit `num_bits'.
|
||||
|
||||
2016-08-16 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[lzw] Avoid buffer overrun.
|
||||
|
@ -65,6 +65,9 @@
|
||||
FT_Int result;
|
||||
|
||||
|
||||
if ( num_bits > LZW_MAX_BITS )
|
||||
return -1;
|
||||
|
||||
if ( state->buf_clear ||
|
||||
offset >= state->buf_size ||
|
||||
state->free_ent >= state->free_bits )
|
||||
|
Loading…
Reference in New Issue
Block a user