[cff] Check glyph-name's length, not arrayZ

As the latter can be non-null while still zero-length.
This commit is contained in:
Behdad Esfahbod 2022-05-13 13:49:17 -06:00
parent dc09053f19
commit a2f132f1fc
1 changed files with 1 additions and 1 deletions

View File

@ -1291,7 +1291,7 @@ struct cff1
hb_ubytes_t ustr = (*stringIndex)[sid - cff1_std_strings_length];
gname.name = hb_bytes_t ((const char*)ustr.arrayZ, ustr.length);
}
if (unlikely (!gname.name.arrayZ)) { fini (); return; }
if (unlikely (!gname.name.length)) { fini (); return; }
glyph_names.push (gname);
}
glyph_names.qsort ();