summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-01-07 19:43:56 +0100
committerLennart Poettering <lennart@poettering.net>2016-01-11 19:39:59 +0100
commit509eddd202f2d0962379defe1c483d5c9bd482c8 (patch)
tree875d99d819ad48583d083022ae3a8e9f5a4f2a6a /src/shared
parentb577e3d589ec00f6d96e90b0d4bf344dbd40cd76 (diff)
resolved: make sure domain name hash function deals nicely with NUL embedded in labels
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/dns-domain.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/shared/dns-domain.c b/src/shared/dns-domain.c
index 3848a0518d..729508e6a5 100644
--- a/src/shared/dns-domain.c
+++ b/src/shared/dns-domain.c
@@ -503,10 +503,8 @@ void dns_name_hash_func(const void *s, struct siphash *state) {
if (r == 0)
break;
- label[r] = 0;
- ascii_strlower(label);
-
- string_hash_func(label, state);
+ ascii_strlower_n(label, r);
+ siphash24_compress(label, r, state);
}
/* enforce that all names are terminated by the empty label */