diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-04-05 15:56:28 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-04-05 15:56:28 +0000 |
commit | a1eb4be12da9344b632762f820ef148712c4dd29 (patch) | |
tree | c216a4cb547dfeffb9698bbdab584bbabdaf486f /usr.bin/passwd | |
parent | a3633d0926ef1e0ecdc3c0009dc7170a2e1038fd (diff) |
strlcpy; ok matthieu henning miod
Diffstat (limited to 'usr.bin/passwd')
-rw-r--r-- | usr.bin/passwd/pwd_gensalt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/passwd/pwd_gensalt.c b/usr.bin/passwd/pwd_gensalt.c index baacc130b81..66598aad4ca 100644 --- a/usr.bin/passwd/pwd_gensalt.c +++ b/usr.bin/passwd/pwd_gensalt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pwd_gensalt.c,v 1.15 2002/11/21 15:02:03 henning Exp $ */ +/* $OpenBSD: pwd_gensalt.c,v 1.16 2003/04/05 15:56:27 deraadt Exp $ */ /* * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> * All rights reserved. @@ -121,7 +121,7 @@ pwd_gensalt(char *salt, int saltlen, struct passwd *pwd, login_cap_t *lc, char t strlcpy(salt, "$1$", saltlen); to64(&salt[3], arc4random(), 4); to64(&salt[7], arc4random(), 4); - strcpy(&salt[11], "$"); + strlcpy(&salt[11], "$", saltlen - 11); } else if (!strcmp(now, "blowfish")) { int rounds = atoi(next); |