diff options
author | gstein <gstein@13f79535-47bb-0310-9956-ffa450edef68> | 2000-10-16 12:32:42 +0000 |
---|---|---|
committer | gstein <gstein@13f79535-47bb-0310-9956-ffa450edef68> | 2000-10-16 12:32:42 +0000 |
commit | 09d08a8a25334a059dd38488797319edda83c077 (patch) | |
tree | e269b6c1c94e414fce6368ab084cf7b82cb83442 /tables | |
parent | 2cf3669543f97367e06efb74fb9a12c7c1b5172a (diff) | |
download | libapr-09d08a8a25334a059dd38488797319edda83c077.tar.gz |
Make sure that passing (s, APR_HASH_KEY_STRING) and (s, strlen(s)) are
equivalent. The +1 would lead to subtle errors when people forgot t
include the null-term in the hash value. (and it is possible that the
caller is extracting a substring for the key and does not *have* a null
term when doing a lookup)
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60590 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'tables')
-rw-r--r-- | tables/apr_hash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tables/apr_hash.c b/tables/apr_hash.c index f6b6fad31..b0385fb18 100644 --- a/tables/apr_hash.c +++ b/tables/apr_hash.c @@ -216,7 +216,7 @@ static apr_hash_entry_t **find_entry(apr_hash_t *ht, int i; if (klen == APR_HASH_KEY_STRING) - klen = strlen(key) + 1; + klen = strlen(key); /* * This is Daniel J. Bernstein's popular `times 33' hash function |