mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-22 07:21:06 +01:00
Clamp max_ops to upper bound in hb-sanitize.hh
This commit is contained in:
1 parent
aa43e183dd
commit
d70afb1e5a
1 file changed
+3
-2
+3
-2
@@ -189,8 +189,9 @@ struct hb_sanitize_context_t :
|
||||
void start_processing ()
|
||||
{
|
||||
reset_object ();
|
||||
this->max_ops = hb_max ((unsigned int) (this->end - this->start) * HB_SANITIZE_MAX_OPS_FACTOR,
|
||||
(unsigned) HB_SANITIZE_MAX_OPS_MIN);
|
||||
this->max_ops = hb_min (hb_max ((unsigned int) (this->end - this->start) * HB_SANITIZE_MAX_OPS_FACTOR,
|
||||
(unsigned) HB_SANITIZE_MAX_OPS_MIN),
|
||||
(unsigned) HB_SANITIZE_MAX_OPS_MAX);
|
||||
this->edit_count = 0;
|
||||
this->debug_depth = 0;
|
||||
|
||||
|
||||
Reference in new issue
Block a user