diff --git a/src/hb-cff-interp-dict-common.hh b/src/hb-cff-interp-dict-common.hh index e589e9fedde7f64190feb036b08e805ed3e1bd09..acbc8cd830149792eb176f11118248b482fa2177 100644 --- a/src/hb-cff-interp-dict-common.hh +++ b/src/hb-cff-interp-dict-common.hh @@ -279,6 +279,9 @@ struct TopDictOpSet : DictOpSet return false; env.clear_args (); break; + case OpCode_FontMatrix: + env.clear_args (); + break; default: return DictOpSet::process_op (op, env); } diff --git a/src/hb-subset-cff-common.hh b/src/hb-subset-cff-common.hh index 6f944d306233d2f2282ff2d5f6dadb0aeecf50a9..6c2b2a2d3b42ff2fdb059d20d14492b1499e729f 100644 --- a/src/hb-subset-cff-common.hh +++ b/src/hb-subset-cff-common.hh @@ -59,7 +59,7 @@ struct ByteStrBuff : hb_vector_t return encode_byte ((v >> 8) + OpCode_TwoByteNegInt0) && encode_byte (v & 0xFF); } } - assert ((v & ~0xFFFF) == 0); + assert ((-32768 <= v) && (v <= 32767)); return encode_byte (OpCode_shortint) && encode_byte ((v >> 8) & 0xFF) && encode_byte (v & 0xFF);