From f564e5f4a62fb8ca54695c722c7e04803df869ec Mon Sep 17 00:00:00 2001
From: Justus Winter <4winter@informatik.uni-hamburg.de>
Date: Sun, 22 Nov 2015 18:13:01 +0100
Subject: libihash: fix fast insertion corner case

* libihash/ihash.c (hurd_ihash_locp_add): Fix insertion if the key
doesn't match.
---
 libihash/ihash.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libihash/ihash.c b/libihash/ihash.c
index 8b1ad1f8..598d3412 100644
--- a/libihash/ihash.c
+++ b/libihash/ihash.c
@@ -267,6 +267,7 @@ hurd_ihash_locp_add (hurd_ihash_t ht, hurd_ihash_locp_t locp,
   if (ht->size == 0
       || item == NULL
       || item->value == _HURD_IHASH_DELETED
+      || ! compare (ht, item->key, key)
       || hurd_ihash_get_load (ht) > ht->max_load)
     return hurd_ihash_add (ht, key, value);
 
-- 
cgit v1.2.3