summaryrefslogtreecommitdiff
path: root/usr.sbin/user/user.c
diff options
context:
space:
mode:
authorJakob Schlyter <jakob@cvs.openbsd.org>2001-03-24 19:20:52 +0000
committerJakob Schlyter <jakob@cvs.openbsd.org>2001-03-24 19:20:52 +0000
commit5d72f4252ac5d7b661402340d22f3652537c8b72 (patch)
tree9faba746a2917eca102d7e6991480d2bc42b72a5 /usr.sbin/user/user.c
parent95a24cf4221ac4471d6e3085a10153f4a4b8d8db (diff)
fix strlcpy; <raj@cerias.purdue.edu>
Diffstat (limited to 'usr.sbin/user/user.c')
-rw-r--r--usr.sbin/user/user.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/user/user.c b/usr.sbin/user/user.c
index c1ea4423cd6..e48994ea7e7 100644
--- a/usr.sbin/user/user.c
+++ b/usr.sbin/user/user.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: user.c,v 1.19 2001/02/13 09:18:33 deraadt Exp $ */
+/* $OpenBSD: user.c,v 1.20 2001/03/24 19:20:51 jakob Exp $ */
/* $NetBSD: user.c,v 1.17 2000/04/14 06:26:55 simonb Exp $ */
/*
@@ -1145,7 +1145,7 @@ useradd(int argc, char **argv)
bigD = 1;
break;
case 'G':
- strlcpy (buf, optarg, strlen (optarg) + 1);
+ strlcpy (buf, optarg, sizeof(buf));
p = buf;
while ((s = strsep (&p, ",")) != NULL &&
u.u_groupc < NGROUPS_MAX - 2)
@@ -1264,7 +1264,7 @@ usermod(int argc, char **argv)
while ((c = getopt(argc, argv, "G:c:d:e:f:g:l:mos:u:" MOD_OPT_EXTENSIONS)) != -1) {
switch(c) {
case 'G':
- strlcpy (buf, optarg, strlen (optarg) + 1);
+ strlcpy (buf, optarg, sizeof(buf));
p = buf;
while ((s = strsep (&p, ",")) != NULL &&
u.u_groupc < NGROUPS_MAX - 2)