mirror of
https://gitlab.freedesktop.org/freetype/freetype.git
synced 2026-05-08 17:28:13 +02:00
[autofit] Remove globals->gsub_length.
We completely validate the accessed data from the 'GSUB' table, making this field unnecessary. * src/autofit/afglobal.h (AF_FaceGlobalsRec): Remove `gsub_length` field. * src/autofit/afglobal.c (af_face_globals_new), src/autofit/afgsub.c (af_parse_gsub): Updated.
This commit is contained in:
parent
f1cd6dbfa0
commit
0fd0cf33fd
3 changed files with 3 additions and 11 deletions
|
|
@ -373,9 +373,7 @@
|
|||
globals->hb_font = NULL;
|
||||
globals->hb_buf = NULL;
|
||||
|
||||
globals->gsub_length = 0;
|
||||
globals->gsub = NULL;
|
||||
|
||||
globals->gsub = NULL;
|
||||
globals->gsub_lookups_single_alternate = NULL;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -115,9 +115,7 @@ FT_BEGIN_HEADER
|
|||
hb_buffer_t* hb_buf; /* for feature comparison */
|
||||
|
||||
/* The GSUB table. */
|
||||
FT_ULong gsub_length;
|
||||
FT_Byte* gsub;
|
||||
|
||||
/* Lookup offsets, with only SingleSubst and AlternateSubst non-NULL. */
|
||||
FT_UInt32* gsub_lookups_single_alternate;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -310,9 +310,7 @@
|
|||
FT_Byte* limit;
|
||||
|
||||
|
||||
globals->gsub_length = 0;
|
||||
globals->gsub = NULL;
|
||||
|
||||
globals->gsub = NULL;
|
||||
globals->gsub_lookups_single_alternate = NULL;
|
||||
|
||||
/* No error if we can't load or parse GSUB data. */
|
||||
|
|
@ -364,9 +362,7 @@
|
|||
idx++;
|
||||
}
|
||||
|
||||
globals->gsub_length = gsub_length;
|
||||
globals->gsub = gsub;
|
||||
|
||||
globals->gsub = gsub;
|
||||
globals->gsub_lookups_single_alternate = gsub_lookups_single_alternate;
|
||||
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue