diff --git a/src/hb-ot-cff1-table.hh b/src/hb-ot-cff1-table.hh index ac6c9e4d5..70a4fffb7 100644 --- a/src/hb-ot-cff1-table.hh +++ b/src/hb-ot-cff1-table.hh @@ -1267,6 +1267,7 @@ struct cff1 char *buf, unsigned int buf_len) const { if (!buf) return true; + if (unlikely (!is_valid ())) return false; hb_codepoint_t sid = glyph_to_sid (glyph); byte_str_t byte_str; const char *str;