summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Krause <david@cvs.openbsd.org>2005-04-11 05:09:27 +0000
committerDavid Krause <david@cvs.openbsd.org>2005-04-11 05:09:27 +0000
commit4073fe9dcea56411dba8f5771ad7a1c5190a70f5 (patch)
treecae5993a140b82b4dbe753485328759004b21df5
parent386f1b7cc4db4abbfa1fc324025242d011400a38 (diff)
restore lost sprintf -> snprintf conversion
ok krw@ deraadt@ jakob@
-rw-r--r--usr.sbin/bind/lib/dns/dst_api.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/bind/lib/dns/dst_api.c b/usr.sbin/bind/lib/dns/dst_api.c
index 33ca06e554f..d4192aa386d 100644
--- a/usr.sbin/bind/lib/dns/dst_api.c
+++ b/usr.sbin/bind/lib/dns/dst_api.c
@@ -1080,7 +1080,9 @@ buildfilename(dns_name_t *name, dns_keytag_t id,
len = 1 + 3 + 1 + 5 + strlen(suffix) + 1;
if (isc_buffer_availablelength(out) < len)
return (ISC_R_NOSPACE);
- sprintf((char *) isc_buffer_used(out), "+%03d+%05d%s", alg, id, suffix);
+ snprintf((char *) isc_buffer_used(out),
+ isc_buffer_availablelength(out),
+ "+%03d+%05d%s", alg, id, suffix);
isc_buffer_add(out, len);
return (ISC_R_SUCCESS);
}