* 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
This commit is contained in:
parent
4873eb1d31
commit
0a33b44e6e
|
@ -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>
|
2018-08-18 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
[psaux] Avoid slow PS font parsing in case of error.
|
[psaux] Avoid slow PS font parsing in case of error.
|
||||||
|
|
|
@ -121,6 +121,9 @@
|
||||||
if ( cpal->num_colors * COLOR_SIZE > table_size - colors_offset )
|
if ( cpal->num_colors * COLOR_SIZE > table_size - colors_offset )
|
||||||
goto InvalidTable;
|
goto InvalidTable;
|
||||||
|
|
||||||
|
if ( face->palette_data.num_palette_entries > cpal->num_colors )
|
||||||
|
goto InvalidTable;
|
||||||
|
|
||||||
cpal->color_indices = p;
|
cpal->color_indices = p;
|
||||||
cpal->colors = (FT_Byte*)( table + colors_offset );
|
cpal->colors = (FT_Byte*)( table + colors_offset );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue