* src/sfnt/ttcpal.c (tt_face_load_cpal): Add missing safety check.

Reported as

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9981
color
Werner Lemberg 6 years ago
parent 4873eb1d31
commit 0a33b44e6e
  1. 8
      ChangeLog
  2. 3
      src/sfnt/ttcpal.c

@ -1,3 +1,11 @@
2018-08-21 Werner Lemberg <wl@gnu.org>
* src/sfnt/ttcpal.c (tt_face_load_cpal): Add missing safety check.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9981
2018-08-18 Werner Lemberg <wl@gnu.org>
[psaux] Avoid slow PS font parsing in case of error.

@ -121,6 +121,9 @@
if ( cpal->num_colors * COLOR_SIZE > table_size - colors_offset )
goto InvalidTable;
if ( face->palette_data.num_palette_entries > cpal->num_colors )
goto InvalidTable;
cpal->color_indices = p;
cpal->colors = (FT_Byte*)( table + colors_offset );

Loading…
Cancel
Save