From: Keith Packard Date: Mon, 12 Mar 2007 17:30:51 +0000 (-0700) Subject: rehash increment could be zero, causing rehash infinite loop. X-Git-Tag: 2.4.91~39 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=fa741cd4fffbbaa5d4ba9a15f53550ac7817cc92;p=fontconfig.git rehash increment could be zero, causing rehash infinite loop. Bump the rehash value by one so that it is always positive. --- 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;