diff options
author | Petri Lehtinen <petri@digip.org> | 2013-10-15 08:49:40 +0300 |
---|---|---|
committer | Petri Lehtinen <petri@digip.org> | 2013-10-15 08:49:40 +0300 |
commit | 30a4c88843788e2fd5155816fcc10539e277400b (patch) | |
tree | 936a627a03b77eea108a8e405cd0b4e4c897695a /src/hashtable.c | |
parent | 08be94e8e6370ce9ac75fad77db3598a96e58805 (diff) | |
download | jansson-30a4c88843788e2fd5155816fcc10539e277400b.zip jansson-30a4c88843788e2fd5155816fcc10539e277400b.tar.gz jansson-30a4c88843788e2fd5155816fcc10539e277400b.tar.bz2 |
Fix an off-by-one error
Diffstat (limited to 'src/hashtable.c')
-rw-r--r-- | src/hashtable.c | 2 |
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; } |