[sfnt] Return in 'COLR' v1 when layer pointer outside table

* src/sfnt/ttcolr.c (tt_face_get_paint_layers): Add missing return
when paint pointer outside table.
(read_paint): Add missing return when paint pointer outside table.
This commit is contained in:
Dominik Röttsches 2021-04-19 12:49:16 +03:00
parent 7c685cb3f6
commit e662a9500f
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,11 @@
2021-04-19 Dominik Röttsches <drott@chromium.org>
[sfnt] Return in 'COLR' v1 when layer pointer outside table
* src/sfnt/ttcolr.c (tt_face_get_paint_layers): Add missing return
when paint pointer outside table.
(read_paint): Add missing return when paint pointer outside table.
2021-04-18 Alexei Podtelezhnikov <apodtele@gmail.com>
[cache] Switch to lazy SBit setting.

View File

@ -390,6 +390,7 @@
if ( p < colr->base_glyphs_v1 ||
p >= ( (FT_Byte*)colr->table + colr->table_size ) )
return 0;
apaint->format = FT_NEXT_BYTE( p );
@ -725,6 +726,7 @@
if ( p_paint < colr->base_glyphs_v1 ||
p_paint >= ( (FT_Byte*)colr->table + colr->table_size ) )
return 0;
opaque_paint->p = p_paint;