[lzw] Avoid invalid left shift.

* src/lzw/ftzopen.c (ft_lzwstate_get_code): Limit `num_bits'.
Harmony
Werner Lemberg 9 years ago
parent 8d7b9198e3
commit 548f68d805
  1. 6
      ChangeLog
  2. 3
      src/lzw/ftzopen.c

@ -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…
Cancel
Save