Cleanup ContextFormat3 sanitize
This commit is contained in:
parent
e77302c61f
commit
9fc8684fd8
|
@ -463,10 +463,11 @@ struct ContextFormat3
|
||||||
TRACE_SANITIZE ();
|
TRACE_SANITIZE ();
|
||||||
if (!SANITIZE_SELF ()) return false;
|
if (!SANITIZE_SELF ()) return false;
|
||||||
unsigned int count = glyphCount;
|
unsigned int count = glyphCount;
|
||||||
|
if (!SANITIZE_ARRAY (coverage, OffsetTo<Coverage>::get_size (), glyphCount)) return false;
|
||||||
for (unsigned int i = 0; i < count; i++)
|
for (unsigned int i = 0; i < count; i++)
|
||||||
if (!SANITIZE_THIS (coverage[i])) return false;
|
if (!SANITIZE_THIS (coverage[i])) return false;
|
||||||
LookupRecord *lookupRecord = &CAST(LookupRecord, coverage, coverage[0].get_size () * glyphCount);
|
LookupRecord *lookupRecord = &CAST(LookupRecord, coverage, OffsetTo<Coverage>::get_size () * glyphCount);
|
||||||
return SANITIZE_MEM (lookupRecord, lookupRecord[0].get_size () * lookupCount);
|
return SANITIZE_ARRAY (lookupRecord, LookupRecord::get_size (), lookupCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in New Issue