diff options
author | Hans Insulander <hin@cvs.openbsd.org> | 2003-08-18 11:43:04 +0000 |
---|---|---|
committer | Hans Insulander <hin@cvs.openbsd.org> | 2003-08-18 11:43:04 +0000 |
commit | 40599de7beb612bb65534a934054f313f14b8ad2 (patch) | |
tree | 91634139a0c1ed6f7f6e2041b6545b14bf02ece8 | |
parent | e3ea51b9d60b40e250164eb7e2fc1133493c1e4c (diff) |
Simple string cleanup.
ok todd@
-rw-r--r-- | usr.sbin/afs/src/appl/fs/fs_setacl.c | 10 | ||||
-rw-r--r-- | usr.sbin/afs/src/arlad/inter.c | 5 |
2 files changed, 9 insertions, 6 deletions
diff --git a/usr.sbin/afs/src/appl/fs/fs_setacl.c b/usr.sbin/afs/src/appl/fs/fs_setacl.c index 4c8ebc88a2d..80b2f1d1bfb 100644 --- a/usr.sbin/afs/src/appl/fs/fs_setacl.c +++ b/usr.sbin/afs/src/appl/fs/fs_setacl.c @@ -116,8 +116,9 @@ afs_setacl(char *path, char *user, char *rights) position && acl->NumPositiveEntries; position = position->next) { if (position->RightsMask) { - sprintf(tmpstr, "%s %d\n", position->name, position->RightsMask); - strcat(acltext,tmpstr); + snprintf(tmpstr, sizeof(tmpstr), "%s %d\n", + position->name, position->RightsMask); + strlcat(acltext, tmpstr, sizeof(acltext)); } else acl->NumPositiveEntries--; } @@ -125,8 +126,9 @@ afs_setacl(char *path, char *user, char *rights) position && acl->NumNegativeEntries; position = position->next) { if (position->RightsMask) { - sprintf(tmpstr, "%s %d\n", position->name, position->RightsMask); - strcat(acltext,tmpstr); + snprintf(tmpstr, sizeof(tmpstr), "%s %d\n", + position->name, position->RightsMask); + strlcat(acltext, tmpstr, sizeof(acltext)); } else acl->NumNegativeEntries--; } diff --git a/usr.sbin/afs/src/arlad/inter.c b/usr.sbin/afs/src/arlad/inter.c index 9b77b8bc42c..5fa1fe09865 100644 --- a/usr.sbin/afs/src/arlad/inter.c +++ b/usr.sbin/afs/src/arlad/inter.c @@ -1085,8 +1085,9 @@ cm_walk (VenusFid fid, * the expansion of the symlink and append fname to it. */ if (fname != NULL) { - strcat (symlink, "/"); - strcat (symlink, fname); + + strlcat (symlink, "/", sizeof(symlink)); + strlcat (symlink, fname, sizeof(symlink)); } strlcpy(store_name, symlink, sizeof(store_name)); fname = store_name; |