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; }