mirror of
https://github.com/systemd/systemd.git
synced 2024-11-23 18:23:32 +08:00
resolved-util: NUL-terminate host label
In case the host has a 63-byte hostname, we must have enough space for a NUL terminator as well.
This commit is contained in:
parent
e6267e832b
commit
f5de77fa08
@ -14,7 +14,7 @@ int resolve_system_hostname(char **full_hostname, char **first_label) {
|
||||
#elif HAVE_LIBIDN
|
||||
int k;
|
||||
#endif
|
||||
char label[DNS_LABEL_MAX];
|
||||
char label[DNS_LABEL_MAX+1];
|
||||
const char *p, *decoded;
|
||||
int r;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user