aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-04-24 18:20:10 +0000
committerUlrich Drepper <drepper@redhat.com>2009-04-24 18:20:10 +0000
commitc2d5bd5b00cfbb0ef192821f2d724fb6448d59e3 (patch)
tree61e1ed7ad4b5c220917d91bae2a8aa38a037b4c2 /misc
parentf397be127c20a04c55a0545c0950dcb8acd03eaa (diff)
downloadglibc-c2d5bd5b00cfbb0ef192821f2d724fb6448d59e3.zip
glibc-c2d5bd5b00cfbb0ef192821f2d724fb6448d59e3.tar.gz
glibc-c2d5bd5b00cfbb0ef192821f2d724fb6448d59e3.tar.bz2
[BZ #10100]
2009-04-24 Ulrich Drepper <drepper@redhat.com> [BZ #10100] * misc/hsearch_r.c (hsearch_r): Add back ensurance that hval is not zero.
Diffstat (limited to 'misc')
-rw-r--r--misc/hsearch_r.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/misc/hsearch_r.c b/misc/hsearch_r.c
index 6e32afc..73b9565 100644
--- a/misc/hsearch_r.c
+++ b/misc/hsearch_r.c
@@ -157,6 +157,8 @@ hsearch_r (item, action, retval, htab)
hval <<= 4;
hval += item.key[count];
}
+ if (hval == 0)
+ ++hval;
/* First hash function: simply take the modul but prevent zero. */
idx = hval % htab->size + 1;