mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-21 15:01:01 +01:00
[ft] Reject loading of font directory
This commit is contained in:
1 parent
4adeb6a01e
commit
6fb10ded54
1 file changed
+4
@@ -1104,6 +1104,10 @@ _hb_ft_reference_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data
|
||||
FT_ULong length = 0;
|
||||
FT_Error error;
|
||||
|
||||
/* In new FreeType, a tag value of 1 loads the SFNT table directory. Reject it. */
|
||||
if (tag == 1)
|
||||
return nullptr;
|
||||
|
||||
/* Note: FreeType like HarfBuzz uses the NONE tag for fetching the entire blob */
|
||||
|
||||
error = FT_Load_Sfnt_Table (ft_face, tag, 0, nullptr, &length);
|
||||
|
||||
Reference in new issue
Block a user