Don't allow reference blob be accessed using empty tag in hb_face_reference_table (#1947)
This commit is contained in:
parent
c9eb913f4c
commit
f441a7c008
|
@ -367,6 +367,9 @@ hb_blob_t *
|
||||||
hb_face_reference_table (const hb_face_t *face,
|
hb_face_reference_table (const hb_face_t *face,
|
||||||
hb_tag_t tag)
|
hb_tag_t tag)
|
||||||
{
|
{
|
||||||
|
if (unlikely (tag == HB_TAG_NONE))
|
||||||
|
return hb_blob_get_empty ();
|
||||||
|
|
||||||
return face->reference_table (tag);
|
return face->reference_table (tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -238,11 +238,6 @@ _subset_table (hb_subset_plan_t *plan,
|
||||||
static bool
|
static bool
|
||||||
_should_drop_table (hb_subset_plan_t *plan, hb_tag_t tag)
|
_should_drop_table (hb_subset_plan_t *plan, hb_tag_t tag)
|
||||||
{
|
{
|
||||||
if (unlikely (!tag))
|
|
||||||
/* Drop tables with no tag as that means table header in
|
|
||||||
_hb_face_builder_reference_table */
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if (plan->drop_tables->has (tag))
|
if (plan->drop_tables->has (tag))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue