From 613e630617074eb9b62b794cc37c9b42a7fb079b Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 13 Oct 2015 23:33:28 -0300 Subject: [PATCH] Reduce max nesting level from 8 to 6 We probably should implement better system to catch cyclic lookups. But for now, this speeds up worst case behavior with broken fonts considerably without compromising legitimate usecases. https://github.com/behdad/harfbuzz/issues/139#issuecomment-147788447 --- src/hb-ot-layout-common-private.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-ot-layout-common-private.hh b/src/hb-ot-layout-common-private.hh index 6f818cb13..ea61f5c1b 100644 --- a/src/hb-ot-layout-common-private.hh +++ b/src/hb-ot-layout-common-private.hh @@ -44,7 +44,7 @@ namespace OT { #define NOT_COVERED ((unsigned int) -1) -#define MAX_NESTING_LEVEL 8 +#define MAX_NESTING_LEVEL 6 #define MAX_CONTEXT_LENGTH 64