From a2f132f1fc5ed1c8426dea1b1e27aa1eaf8eeb04 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 13 May 2022 13:49:17 -0600 Subject: [PATCH] [cff] Check glyph-name's length, not arrayZ As the latter can be non-null while still zero-length. --- src/hb-ot-cff1-table.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-ot-cff1-table.hh b/src/hb-ot-cff1-table.hh index db614fe7e..9de58f656 100644 --- a/src/hb-ot-cff1-table.hh +++ b/src/hb-ot-cff1-table.hh @@ -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 ();