Doh. Don't use CPAL or COLR data if tables are missing.
Reported by Alexei. * src/sfnt/ttcolr.c (tt_face_get_colr_layer): Return immediately if `colr' is NULL. * src/sfnt/ttcpal.c (tt_face_palette_set): Return immediately, if `cpal' is NULL.
This commit is contained in:
parent
a56e4bf7a2
commit
7915fd51f1
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
||||||
|
2018-06-19 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
Doh. Don't use CPAL or COLR data if tables are missing.
|
||||||
|
|
||||||
|
Reported by Alexei.
|
||||||
|
|
||||||
|
* src/sfnt/ttcolr.c (tt_face_get_colr_layer): Return immediately if
|
||||||
|
`colr' is NULL.
|
||||||
|
|
||||||
|
* src/sfnt/ttcpal.c (tt_face_palette_set): Return immediately, if
|
||||||
|
`cpal' is NULL.
|
||||||
|
|
||||||
2018-06-17 Alexei Podtelezhnikov <apodtele@gmail.com>
|
2018-06-17 Alexei Podtelezhnikov <apodtele@gmail.com>
|
||||||
|
|
||||||
[base] Introduce `FT_New_Glyph'.
|
[base] Introduce `FT_New_Glyph'.
|
||||||
|
|
|
@ -220,6 +220,9 @@
|
||||||
FT_UInt glyph_index;
|
FT_UInt glyph_index;
|
||||||
|
|
||||||
|
|
||||||
|
if ( !colr )
|
||||||
|
return 0;
|
||||||
|
|
||||||
if ( !iterator->p )
|
if ( !iterator->p )
|
||||||
{
|
{
|
||||||
FT_ULong offset;
|
FT_ULong offset;
|
||||||
|
|
|
@ -258,7 +258,7 @@
|
||||||
FT_ULong record_offset;
|
FT_ULong record_offset;
|
||||||
|
|
||||||
|
|
||||||
if ( palette_index >= face->palette_data.num_palettes )
|
if ( !cpal || palette_index >= face->palette_data.num_palettes )
|
||||||
return FT_THROW( Invalid_Argument );
|
return FT_THROW( Invalid_Argument );
|
||||||
|
|
||||||
offset = cpal->color_indices + 2 * palette_index;
|
offset = cpal->color_indices + 2 * palette_index;
|
||||||
|
|
Loading…
Reference in New Issue