diff options
author | 2002-05-24 21:22:37 +0000 | |
---|---|---|
committer | 2002-05-24 21:22:37 +0000 | |
commit | 5af14704cf583f2bdbbe00069ed34254a82d104f (patch) | |
tree | 2e7b4fc407290059fd5e1ddb505637dcf41046e2 /lib/libc/gen/authenticate.c | |
parent | Replace strcpy() with strlcpy(). (diff) | |
download | wireguard-openbsd-5af14704cf583f2bdbbe00069ed34254a82d104f.tar.xz wireguard-openbsd-5af14704cf583f2bdbbe00069ed34254a82d104f.zip |
try to use strlcpy and snprintf more; ok various
Diffstat (limited to 'lib/libc/gen/authenticate.c')
-rw-r--r-- | lib/libc/gen/authenticate.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/gen/authenticate.c b/lib/libc/gen/authenticate.c index 9aaba58253e..a7903d3c0d0 100644 --- a/lib/libc/gen/authenticate.c +++ b/lib/libc/gen/authenticate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authenticate.c,v 1.9 2002/03/20 17:17:15 mpech Exp $ */ +/* $OpenBSD: authenticate.c,v 1.10 2002/05/24 21:22:37 deraadt Exp $ */ /*- * Copyright (c) 1997 Berkeley Software Design, Inc. All rights reserved. @@ -208,7 +208,7 @@ auth_approval(auth_session_t *as, login_cap_t *lc, char *name, char *type) return (0); } if (pwd == NULL && (approve = strchr(name, '.')) != NULL) { - strcpy(path, name); + strlcpy(path, name, sizeof path); path[approve-name] = '\0'; pwd = getpwnam(name); } @@ -301,7 +301,7 @@ auth_usercheck(char *name, char *style, char *type, char *password) if (strlen(name) >= sizeof(namebuf)) return (NULL); - strcpy(namebuf, name); + strlcpy(namebuf, name, sizeof namebuf); name = namebuf; /* @@ -367,7 +367,7 @@ auth_userchallenge(char *name, char *style, char *type, char **challengep) if (strlen(name) >= sizeof(namebuf)) return (NULL); - strcpy(namebuf, name); + strlcpy(namebuf, name, sizeof namebuf); name = namebuf; /* |