[subset] Couple of fixes for fuzzer discovered issues. (#924) * [subset] sanitize individual DeviceRecord's as part of hdmx sanitization. * [subset] Fix out of bounds read with non-two byte align glyphs. * [subset] Just use size_device_record >= DeviceRecord::min_size. * [subset] Add TODO. * [subset] Re-order checks in hdmx sanitize.
diff --git a/src/hb-ot-hdmx-table.hh b/src/hb-ot-hdmx-table.hh index 6ad57af..c0b22b2 100644 --- a/src/hb-ot-hdmx-table.hh +++ b/src/hb-ot-hdmx-table.hh
@@ -198,6 +198,7 @@ TRACE_SANITIZE (this); return_trace (c->check_struct (this) && version == 0 && !_hb_unsigned_int_mul_overflows (num_records, size_device_record) && + size_device_record >= DeviceRecord::min_size && c->check_range (this, get_size())); }