From 83dc4d1d35d8b52a45ad793e617a5bbc5401922f Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 9 Nov 2025 15:13:52 -0700 Subject: [PATCH] [sanitize] Don't do edit-sanitize cycle Part of fixing https://github.com/harfbuzz/harfbuzz/issues/5535 --- src/hb-sanitize.hh | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/src/hb-sanitize.hh b/src/hb-sanitize.hh index 88a956b27..92e009fac 100644 --- a/src/hb-sanitize.hh +++ b/src/hb-sanitize.hh @@ -440,7 +440,6 @@ struct hb_sanitize_context_t : init (blob); - retry: DEBUG_MSG_FUNC (SANITIZE, start, "start"); start_processing (); @@ -454,38 +453,6 @@ struct hb_sanitize_context_t : Type *t = reinterpret_cast (const_cast (start)); sane = t->sanitize (this); - if (sane) - { - if (edit_count) - { - DEBUG_MSG_FUNC (SANITIZE, start, "passed first round with %u edits; going for second round", edit_count); - - /* sanitize again to ensure no toe-stepping */ - edit_count = 0; - sane = t->sanitize (this); - if (edit_count) { - DEBUG_MSG_FUNC (SANITIZE, start, "requested %u edits in second round; FAILING", edit_count); - sane = false; - } - } - } - else - { - if (edit_count && !writable) - { - unsigned length; - start = hb_blob_get_data_writable (blob, &length); - end = start + length; - - if (start) - { - writable = true; - /* ok, we made it writable by relocating. try again */ - DEBUG_MSG_FUNC (SANITIZE, start, "retry"); - goto retry; - } - } - } end_processing ();