summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2006-10-13 23:17:33 +0000
committerWayne Davison <wayned@samba.org>2006-10-13 23:17:33 +0000
commitc9bce0b8f8a485f11ce4f90356e9346036f14daf (patch)
treef7583d1eefa8781e7122e0b84d2b83e32a022c36 /lib
parentdeee574b1198a2886369f4ecbfbeaa6f851bb41d (diff)
downloadrsync-c9bce0b8f8a485f11ce4f90356e9346036f14daf.tar.gz
rsync-c9bce0b8f8a485f11ce4f90356e9346036f14daf.tar.bz2
rsync-c9bce0b8f8a485f11ce4f90356e9346036f14daf.zip
Changed strcpy() calls into strlcpy() calls, just to be extra safe.
Diffstat (limited to 'lib')
-rw-r--r--lib/permstring.c2
-rw-r--r--lib/pool_alloc.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/permstring.c b/lib/permstring.c
index 304b2a93..ba981ee2 100644
--- a/lib/permstring.c
+++ b/lib/permstring.c
@@ -30,7 +30,7 @@ void permstring(char *perms, mode_t mode)
static const char *perm_map = "rwxrwxrwx";
int i;
- strcpy(perms, "----------");
+ strlcpy(perms, "----------", 11);
for (i = 0; i < 9; i++) {
if (mode & (1 << i))
diff --git a/lib/pool_alloc.c b/lib/pool_alloc.c
index ac655a51..1ec381d1 100644
--- a/lib/pool_alloc.c
+++ b/lib/pool_alloc.c
@@ -272,7 +272,7 @@ pool_stats(alloc_pool_t p, int fd, int summarize)
if (pool->live)
FDEXTSTAT(pool->live);
- strcpy(buf, " FREE BOUND\n");
+ strlcpy(buf, " FREE BOUND\n", sizeof buf);
write(fd, buf, strlen(buf));
for (cur = pool->free; cur; cur = cur->next)