diff options
Diffstat (limited to 'usr.sbin/bind/lib/dns/name.c')
-rw-r--r-- | usr.sbin/bind/lib/dns/name.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/bind/lib/dns/name.c b/usr.sbin/bind/lib/dns/name.c index 08c25ff2bb9..7c33c99fb3e 100644 --- a/usr.sbin/bind/lib/dns/name.c +++ b/usr.sbin/bind/lib/dns/name.c @@ -1785,9 +1785,8 @@ dns_name_totext(dns_name_t *name, isc_boolean_t omit_final_dot, char buf[5]; if (trem < 4) return (ISC_R_NOSPACE); - snprintf(buf, sizeof(buf), + snprintf(tdata, trem, "\\%03u", c); - memcpy(tdata, buf, 4); tdata += 4; trem -= 4; ndata++; @@ -1942,7 +1941,7 @@ dns_name_tofilenametext(dns_name_t *name, isc_boolean_t omit_final_dot, } else { if (trem < 3) return (ISC_R_NOSPACE); - sprintf(tdata, "%%%02X", c); + snprintf(tdata, trem, "%%%02X", c); tdata += 3; trem -= 3; ndata++; |