Fix thinko

Fixes https://oss-fuzz.com/testcase-detail/4787105656864768
This commit is contained in:
Behdad Esfahbod 2023-07-08 16:21:24 -06:00
parent d84c5f29b7
commit f60dbd906a
2 changed files with 4 additions and 4 deletions

View file

@ -542,7 +542,7 @@ struct UnsizedArrayOf
bool sanitize_shallow (hb_sanitize_context_t *c, unsigned int count) const
{
TRACE_SANITIZE (this);
return_trace (c->check_array_sized (arrayZ, count, sizeof (Type)));
return_trace (c->check_array (arrayZ, count));
}
public:
@ -756,7 +756,7 @@ struct ArrayOf
bool sanitize_shallow (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
return_trace (len.sanitize (c) && c->check_array_sized (arrayZ, len, sizeof (Type)));
return_trace (len.sanitize (c) && c->check_array_sized (arrayZ, len, sizeof (LenType)));
}
public:
@ -899,7 +899,7 @@ struct HeadlessArrayOf
{
TRACE_SANITIZE (this);
return_trace (lenP1.sanitize (c) &&
(!lenP1 || c->check_array_sized (arrayZ, lenP1 - 1, sizeof (Type))));
(!lenP1 || c->check_array_sized (arrayZ, lenP1 - 1, sizeof (LenType))));
}
public:
@ -952,7 +952,7 @@ struct ArrayOfM1
{
TRACE_SANITIZE (this);
return_trace (lenM1.sanitize (c) &&
(c->check_array_sized (arrayZ, lenM1 + 1, sizeof (Type))));
(c->check_array_sized (arrayZ, lenM1 + 1, sizeof (LenType))));
}
public: