summaryrefslogtreecommitdiff
path: root/debian/patches/ihash-as-cache0002-libihash-fix-fast-insertion-corner-case.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/ihash-as-cache0002-libihash-fix-fast-insertion-corner-case.patch')
-rw-r--r--debian/patches/ihash-as-cache0002-libihash-fix-fast-insertion-corner-case.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/debian/patches/ihash-as-cache0002-libihash-fix-fast-insertion-corner-case.patch b/debian/patches/ihash-as-cache0002-libihash-fix-fast-insertion-corner-case.patch
new file mode 100644
index 00000000..4bbac576
--- /dev/null
+++ b/debian/patches/ihash-as-cache0002-libihash-fix-fast-insertion-corner-case.patch
@@ -0,0 +1,26 @@
+From 143ea78cf3e14b9f9f7609e9fbb0a30635a92788 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: [PATCH hurd 2/5] 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 8b1ad1f..598d341 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);
+
+--
+2.1.4
+