commit | 64ed03c9be0ddb0cba2674e22e8f377090ec5124 | [log] [tgz] |
---|---|---|
author | Behdad Esfahbod <behdad@behdad.org> | Tue Jan 24 18:30:49 2023 -0700 |
committer | Behdad Esfahbod <behdad@behdad.org> | Tue Jan 24 18:33:34 2023 -0700 |
tree | 861407816d4035743a0bbaec50f75c47c9fbe886 | |
parent | c89aebc40b2c29ad6bcae8e5fff7189f70b35d55 [diff] |
[cff1] Return no name for out-of-range glyph IDs Was returning .notdef before.
diff --git a/src/hb-ot-cff1-table.hh b/src/hb-ot-cff1-table.hh index c68763f..8717b4a 100644 --- a/src/hb-ot-cff1-table.hh +++ b/src/hb-ot-cff1-table.hh
@@ -1344,6 +1344,7 @@ bool get_glyph_name (hb_codepoint_t glyph, char *buf, unsigned int buf_len) const { + if (unlikely (glyph >= num_glyphs)) return false; if (unlikely (!is_valid ())) return false; if (is_CID()) return false; if (unlikely (!buf_len)) return true;