diff --git a/src/hb-cff-interp-common.hh b/src/hb-cff-interp-common.hh index a7206a787..0997a3a9f 100644 --- a/src/hb-cff-interp-common.hh +++ b/src/hb-cff-interp-common.hh @@ -356,6 +356,15 @@ struct UnsizedByteStr : UnsizedArrayOf inline static bool serialize_int2 (hb_serialize_context_t *c, int value) { return serialize_int (c, OpCode_shortint, value); } + + /* Defining null_size allows a Null object may be created. Should be safe because: + * A descendent struct Dict uses a Null pointer to indicate a missing table, + * checked before access. + * ByteStr, a wrapper struct pairing a byte pointer along with its length, always + * checks the length before access. A Null pointer is used as the initial pointer + * along with zero length by the default ctor. + */ + DEFINE_SIZE_MIN(0); }; struct ByteStr