mirror of
https://github.com/systemd/systemd
synced 2024-10-04 15:21:01 +00: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 a new issue