mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
4748. [cleanup] Sprintf to snprintf coversions. [RT #46132]
This commit is contained in:
@@ -1878,8 +1878,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),
|
||||
(int)isc_buffer_availablelength(out),
|
||||
"+%03d+%05d%s", alg, id, suffix);
|
||||
isc_buffer_add(out, len);
|
||||
|
||||
return (ISC_R_SUCCESS);
|
||||
|
Reference in New Issue
Block a user