diff options
author | Todd T. Fries <todd@cvs.openbsd.org> | 2003-06-27 19:08:24 +0000 |
---|---|---|
committer | Todd T. Fries <todd@cvs.openbsd.org> | 2003-06-27 19:08:24 +0000 |
commit | d86da5bd6abde93d50f7b724a52771877c8cabbc (patch) | |
tree | 898d808c8e5b8d3698e098bb3660051ff61e7964 /usr.sbin/bind/lib/isc/unix | |
parent | 6af2197a68b3a0e9ce04f275a4ad9cd3d800e13d (diff) |
string cleaning; "Put it in. If it breaks, tough" Theo.
work by me, useful feedback from krw, jakob, tedu, and tholo
Diffstat (limited to 'usr.sbin/bind/lib/isc/unix')
-rw-r--r-- | usr.sbin/bind/lib/isc/unix/file.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/usr.sbin/bind/lib/isc/unix/file.c b/usr.sbin/bind/lib/isc/unix/file.c index 95f5428ca43..f6e80e7fa7e 100644 --- a/usr.sbin/bind/lib/isc/unix/file.c +++ b/usr.sbin/bind/lib/isc/unix/file.c @@ -145,8 +145,7 @@ isc_file_template(const char *path, const char *templet, char *buf, if ((s - path + 1 + strlen(templet) + 1) > buflen) return (ISC_R_NOSPACE); - strncpy(buf, path, s - path + 1); - buf[s - path + 1] = '\0'; + strlcpy(buf, path, buflen); strlcat(buf, templet, buflen); } else { if ((strlen(templet) + 1) > buflen) |