[aat] Fix two wrongs that made a right before!
Unfortunately our static asserts (DEFINE_SIZE_STATIC) don't actually fail when used in templates, thanks to SFINAE. Le sighs. Probably fixes https://oss-fuzz.com/v2/testcase-detail/5740171484463104
This commit is contained in:
parent
e940530c97
commit
2c824d3644
|
@ -164,7 +164,7 @@ struct LookupFormat4
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
HBUINT16 format; /* Format identifier--format = 2 */
|
HBUINT16 format; /* Format identifier--format = 4 */
|
||||||
VarSizedBinSearchArrayOf<LookupSegmentArray<T> >
|
VarSizedBinSearchArrayOf<LookupSegmentArray<T> >
|
||||||
segments; /* The actual segments. These must already be sorted,
|
segments; /* The actual segments. These must already be sorted,
|
||||||
* according to the first word in each one (the last
|
* according to the first word in each one (the last
|
||||||
|
@ -187,7 +187,7 @@ struct LookupSingle
|
||||||
GlyphID glyph; /* Last GlyphID */
|
GlyphID glyph; /* Last GlyphID */
|
||||||
T value; /* The lookup value (only one) */
|
T value; /* The lookup value (only one) */
|
||||||
public:
|
public:
|
||||||
DEFINE_SIZE_STATIC (4 + T::static_size);
|
DEFINE_SIZE_STATIC (2 + T::static_size);
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|
|
@ -833,7 +833,7 @@ struct VarSizedBinSearchArrayOf
|
||||||
{
|
{
|
||||||
TRACE_SANITIZE (this);
|
TRACE_SANITIZE (this);
|
||||||
return_trace (header.sanitize (c) &&
|
return_trace (header.sanitize (c) &&
|
||||||
Type::static_size >= header.unitSize &&
|
Type::static_size <= header.unitSize &&
|
||||||
c->check_array (bytesZ.arrayZ, header.nUnits, header.unitSize));
|
c->check_array (bytesZ.arrayZ, header.nUnits, header.unitSize));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue