diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-05-24 21:22:38 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-05-24 21:22:38 +0000 |
commit | 614d3b268363cdee32aba3cafe8e123fe69ac75d (patch) | |
tree | 9662f1a62a0bd0d9512daf0fa448d0a7f051956a /lib/libc/gen/authenticate.c | |
parent | 899eab9f01ad712357176d191d1b6a49639c11e3 (diff) |
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; /* |