diff options
Diffstat (limited to 'usr.sbin/bind/lib/isc/unix/file.c')
| -rw-r--r-- | usr.sbin/bind/lib/isc/unix/file.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/bind/lib/isc/unix/file.c b/usr.sbin/bind/lib/isc/unix/file.c index 1e3d96db95f..95f5428ca43 100644 --- a/usr.sbin/bind/lib/isc/unix/file.c +++ b/usr.sbin/bind/lib/isc/unix/file.c @@ -147,12 +147,12 @@ isc_file_template(const char *path, const char *templet, char *buf, strncpy(buf, path, s - path + 1); buf[s - path + 1] = '\0'; - strcat(buf, templet); + strlcat(buf, templet, buflen); } else { if ((strlen(templet) + 1) > buflen) return (ISC_R_NOSPACE); - strcpy(buf, templet); + strlcpy(buf, templet, buflen); } return (ISC_R_SUCCESS); @@ -310,6 +310,6 @@ isc_file_absolutepath(const char *filename, char *path, size_t pathlen) { return (result); if (strlen(path) + strlen(filename) + 1 > pathlen) return (ISC_R_NOSPACE); - strcat(path, filename); + strlcat(path, filename, pathlen); return (ISC_R_SUCCESS); } |
