[subset] don't allow table adds for tag == -1.

This commit is contained in:
Garret Rieger 2021-08-05 14:03:25 -07:00 committed by Behdad Esfahbod
parent 222b74f08f
commit e5bfd49ae5
1 changed files with 3 additions and 0 deletions

View File

@ -752,6 +752,9 @@ hb_face_builder_create ()
hb_bool_t
hb_face_builder_add_table (hb_face_t *face, hb_tag_t tag, hb_blob_t *blob)
{
if (tag == HB_MAP_VALUE_INVALID)
return false;
if (unlikely (face->destroy != (hb_destroy_func_t) _hb_face_builder_data_destroy))
return false;