diff options
author | 2003-04-05 15:56:27 +0000 | |
---|---|---|
committer | 2003-04-05 15:56:27 +0000 | |
commit | f5ac9e9069c538cf059a1475ccb9c0c7cfec54cf (patch) | |
tree | 250a776413d4077140fe7d9ae58327918ba13642 | |
parent | strlcpy (diff) | |
download | wireguard-openbsd-f5ac9e9069c538cf059a1475ccb9c0c7cfec54cf.tar.xz wireguard-openbsd-f5ac9e9069c538cf059a1475ccb9c0c7cfec54cf.zip |
strlcpy; ok matthieu henning miod
-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); |