aboutsummaryrefslogtreecommitdiff
path: root/src/hashtable.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hashtable.c')
-rw-r--r--src/hashtable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hashtable.c b/src/hashtable.c
index 83ac856..a254cfa 100644
--- a/src/hashtable.c
+++ b/src/hashtable.c
@@ -251,7 +251,7 @@ int hashtable_set(hashtable_t *hashtable,
allocated. */
size_t len = strlen(key);
- if(len > (size_t)-1 - offsetof(pair_t, key)) {
+ if(len >= (size_t)-1 - offsetof(pair_t, key)) {
/* Avoid an overflow if the key is very long */
return -1;
}