[cff] Check buf_len, not buf

Ouch!
This commit is contained in:
Behdad Esfahbod 2022-05-13 14:02:54 -06:00
parent 19a8db8545
commit b46c7faa9c
1 changed files with 1 additions and 1 deletions

View File

@ -1306,7 +1306,7 @@ struct cff1
bool get_glyph_name (hb_codepoint_t glyph,
char *buf, unsigned int buf_len) const
{
if (!buf) return true;
if (!buf_len) return true;
if (unlikely (!is_valid ())) return false;
if (is_CID()) return false;
hb_codepoint_t sid = glyph_to_sid (glyph);