projects
/
platform
/
upstream
/
fontconfig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b74b78
)
rehash increment could be zero, causing rehash infinite loop.
author
Keith Packard
<keithp@neko.keithp.com>
Mon, 12 Mar 2007 17:30:51 +0000
(10:30 -0700)
committer
Keith 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
patch
|
blob
|
history
diff --git
a/fc-glyphname/fc-glyphname.c
b/fc-glyphname/fc-glyphname.c
index
faaa63b
..
d4d0b99
100644
(file)
--- 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;