summaryrefslogtreecommitdiff
path: root/usr.sbin/nsd/dname.c
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2013-09-03 09:27:00 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2013-09-03 09:27:00 +0000
commit9bca93eb8a6a42e42ff6e3c4dbf9ad981af9d565 (patch)
treeb125d8043dfb04fd420c5d07a067ea25a811ce3b /usr.sbin/nsd/dname.c
parent3a46b2e4c37dd915f3a6f15fc551ecac02132dbe (diff)
merge NSD 3.2.16
Diffstat (limited to 'usr.sbin/nsd/dname.c')
-rw-r--r--usr.sbin/nsd/dname.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/nsd/dname.c b/usr.sbin/nsd/dname.c
index 6eaf2e570bc..d4af6329bd7 100644
--- a/usr.sbin/nsd/dname.c
+++ b/usr.sbin/nsd/dname.c
@@ -408,8 +408,10 @@ dname_to_string_r(const dname_type *dname, const dname_type *origin,
*buf = '\0';
return buf;
}
+ dst = buf;
if (dname->label_count == 1) {
- strlcpy(buf, ".", sizeof(buf));
+ *dst++ = '.';
+ *dst = '\0';
return buf;
}
labels_to_convert = dname->label_count - 1;
@@ -420,7 +422,6 @@ dname_to_string_r(const dname_type *dname, const dname_type *origin,
absolute = 0;
}
- dst = buf;
src = dname_name(dname);
for (i = 0; i < labels_to_convert; ++i) {
size_t len = label_length(src);
@@ -572,3 +573,4 @@ dname_make_wildcard(struct region *region,
return 0;
}
#endif
+