diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index b07a40046..505a1e3ce 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -3122,6 +3122,8 @@ struct VarData regionIndices.len = new_ri_count; + if (unlikely (hb_unsigned_mul_overflows (get_row_size (), itemCount))) + return_trace (false); if (unlikely (!c->extend (this))) return_trace (false); for (r = 0; r < new_ri_count; r++)