mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-11 05:17:44 +03:00
resolved: make sure domain name hash function deals nicely with NUL embedded in labels
This commit is contained in:
parent
b577e3d589
commit
509eddd202
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user