From 4073fe9dcea56411dba8f5771ad7a1c5190a70f5 Mon Sep 17 00:00:00 2001 From: David Krause Date: Mon, 11 Apr 2005 05:09:27 +0000 Subject: restore lost sprintf -> snprintf conversion ok krw@ deraadt@ jakob@ --- usr.sbin/bind/lib/dns/dst_api.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'usr.sbin/bind/lib') 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); } -- cgit v1.2.3