]> git.wh0rd.org - fontconfig.git/commitdiff
rehash increment could be zero, causing rehash infinite loop.
authorKeith Packard <keithp@neko.keithp.com>
Mon, 12 Mar 2007 17:30:51 +0000 (10:30 -0700)
committerKeith Packard <keithp@neko.keithp.com>
Mon, 12 Mar 2007 17:30:51 +0000 (10:30 -0700)
Bump the rehash value by one so that it is always positive.

fc-glyphname/fc-glyphname.c

index faaa63b47c0f1cf9f62efc23cfab46f029824fb4..d4d0b990155808f327da73cb578c85c62c29959b 100644 (file)
@@ -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;