diff options
Diffstat (limited to 'src/libs6dns/s6dns_domain_tostring.c')
-rw-r--r-- | src/libs6dns/s6dns_domain_tostring.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libs6dns/s6dns_domain_tostring.c b/src/libs6dns/s6dns_domain_tostring.c index e11715b..2c1cf01 100644 --- a/src/libs6dns/s6dns_domain_tostring.c +++ b/src/libs6dns/s6dns_domain_tostring.c @@ -11,11 +11,13 @@ unsigned int s6dns_domain_tostring (char *s, size_t max, s6dns_domain_t const *d if (d->len == 1) { s[0] = '.' ; + s[1] = 0 ; return 1 ; } else { memcpy(s, d->s + 1, d->len - 1) ; + s[d->len - 1] = 0 ; return d->len - 1 ; } } |