diff options
author | 2001-03-24 19:20:51 +0000 | |
---|---|---|
committer | 2001-03-24 19:20:51 +0000 | |
commit | 0a46f90a4c9fb2130e02e83310f70d161f267394 (patch) | |
tree | 819f7ab0439a27318c98bcd428a0653edb66be6d | |
parent | Use "realinstall" to allow the framework to do other work if needed; (diff) | |
download | wireguard-openbsd-0a46f90a4c9fb2130e02e83310f70d161f267394.tar.xz wireguard-openbsd-0a46f90a4c9fb2130e02e83310f70d161f267394.zip |
fix strlcpy; <raj@cerias.purdue.edu>
-rw-r--r-- | usr.sbin/user/user.c | 6 |
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) |