diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-01-07 19:43:56 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-01-11 19:39:59 +0100 |
commit | 509eddd202f2d0962379defe1c483d5c9bd482c8 (patch) | |
tree | 875d99d819ad48583d083022ae3a8e9f5a4f2a6a /src | |
parent | b577e3d589ec00f6d96e90b0d4bf344dbd40cd76 (diff) |
resolved: make sure domain name hash function deals nicely with NUL embedded in labels
Diffstat (limited to 'src')
-rw-r--r-- | src/shared/dns-domain.c | 6 |
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 */ |