Revert "[sanitize] Simplify(?) check_range"
This reverts commit af0b1ef8a7
.
This commit is contained in:
parent
00cf322e23
commit
6b72a4ddb0
|
@ -248,15 +248,25 @@ struct hb_sanitize_context_t :
|
||||||
return likely (ok);
|
return likely (ok);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, typename ...Ts>
|
template <typename T>
|
||||||
bool check_range (const T *base,
|
bool check_range (const T *base,
|
||||||
unsigned int a,
|
unsigned int a,
|
||||||
unsigned int b,
|
unsigned int b) const
|
||||||
Ts&... ds) const
|
|
||||||
{
|
{
|
||||||
unsigned m;
|
unsigned m;
|
||||||
return !hb_unsigned_mul_overflows (a, b, &m) &&
|
return !hb_unsigned_mul_overflows (a, b, &m) &&
|
||||||
this->check_range (base, m, ds...);
|
this->check_range (base, m);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
bool check_range (const T *base,
|
||||||
|
unsigned int a,
|
||||||
|
unsigned int b,
|
||||||
|
unsigned int c) const
|
||||||
|
{
|
||||||
|
unsigned m;
|
||||||
|
return !hb_unsigned_mul_overflows (a, b, &m) &&
|
||||||
|
this->check_range (base, m, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|
Loading…
Reference in New Issue