resolved: make sure domain name hash function deals nicely with NUL embedded in labels

This commit is contained in:
Lennart Poettering
2016-01-11 19:39:59 +01:00
parent b577e3d589
commit 509eddd202
+2 -4
View File
@@ -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 */