From fa741cd4fffbbaa5d4ba9a15f53550ac7817cc92 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 12 Mar 2007 10:30:51 -0700 Subject: [PATCH] rehash increment could be zero, causing rehash infinite loop. Bump the rehash value by one so that it is always positive. --- fc-glyphname/fc-glyphname.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fc-glyphname/fc-glyphname.c b/fc-glyphname/fc-glyphname.c index faaa63b..d4d0b99 100644 --- a/fc-glyphname/fc-glyphname.c +++ b/fc-glyphname/fc-glyphname.c @@ -206,7 +206,7 @@ insert (FcGlyphName *gn, FcGlyphName **table, FcChar32 h) i = (int) (h % hash); while (table[i]) { - if (!r) r = (int) (h % rehash); + if (!r) r = (int) (h % rehash + 1); i += r; if (i >= hash) i -= hash;