[HarfBuzz] harfbuzz: Branch 'master' - 2 commits

Behdad Esfahbod behdad at kemper.freedesktop.org
Wed Nov 4 18:01:48 PST 2015


 src/hb-open-type-private.hh  |    2 +-
 src/hb-ot-shape-normalize.cc |    2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 14c2de321826c36037adde859ccca3e2011325a9
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed Nov 4 18:00:57 2015 -0800

    Limit max edits during sanitize to 8
    
    Used to be 100.  If a tabe needs more than one or two edits, it's
    probably completely bogus...
    
    Might help with speeding up fuzzing for
    https://github.com/behdad/harfbuzz/issues/157

diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh
index f053502..5ad850b 100644
--- a/src/hb-open-type-private.hh
+++ b/src/hb-open-type-private.hh
@@ -185,7 +185,7 @@ struct hb_dispatch_context_t
 
 /* This limits sanitizing time on really broken fonts. */
 #ifndef HB_SANITIZE_MAX_EDITS
-#define HB_SANITIZE_MAX_EDITS 100
+#define HB_SANITIZE_MAX_EDITS 8
 #endif
 
 struct hb_sanitize_context_t :
commit 9cbc39aef962a95b0eba32c24ff9c415d1316d56
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed Nov 4 18:00:53 2015 -0800

    Minor

diff --git a/src/hb-ot-shape-normalize.cc b/src/hb-ot-shape-normalize.cc
index c1907e8..1162916 100644
--- a/src/hb-ot-shape-normalize.cc
+++ b/src/hb-ot-shape-normalize.cc
@@ -199,6 +199,8 @@ decompose_current_character (const hb_ot_shape_normalize_context_t *c, bool shor
 
   if (u == 0x2011u)
   {
+    /* U+2011 is the only sensible character that is a no-break version of another character
+     * and not a space.  The space ones are handled already.  Handle this lone one. */
     hb_codepoint_t other_glyph;
     if (c->font->get_glyph (0x2010u, 0, &other_glyph))
     {


More information about the HarfBuzz mailing list