[subset] check for addition overflow in hdmx size calculation.
Fixes https://oss-fuzz.com/testcase-detail/4877336988483584.
This commit is contained in:
parent
d77fca997e
commit
40342c9437
|
@ -156,6 +156,7 @@ struct hdmx
|
||||||
TRACE_SANITIZE (this);
|
TRACE_SANITIZE (this);
|
||||||
return_trace (c->check_struct (this) &&
|
return_trace (c->check_struct (this) &&
|
||||||
!hb_unsigned_mul_overflows (numRecords, sizeDeviceRecord) &&
|
!hb_unsigned_mul_overflows (numRecords, sizeDeviceRecord) &&
|
||||||
|
min_size + numRecords * sizeDeviceRecord > numRecords * sizeDeviceRecord &&
|
||||||
sizeDeviceRecord >= DeviceRecord::min_size &&
|
sizeDeviceRecord >= DeviceRecord::min_size &&
|
||||||
c->check_range (this, get_size ()));
|
c->check_range (this, get_size ()));
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue