diff options
author | 2015-07-18 00:56:37 +0000 | |
---|---|---|
committer | 2015-07-18 00:56:37 +0000 | |
commit | 8d29ece6c088d0c255831d64b11abe4d915aa478 (patch) | |
tree | 17b5a71abd0e3919727bdd514c89fc45c8574d64 /lib/libc | |
parent | replace bzero with memset (diff) | |
download | wireguard-openbsd-8d29ece6c088d0c255831d64b11abe4d915aa478.tar.xz wireguard-openbsd-8d29ece6c088d0c255831d64b11abe4d915aa478.zip |
standards compliant error return (null). will make ruby happier, at least.
ok deraadt jeremy
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/crypt/bcrypt.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/libc/crypt/bcrypt.c b/lib/libc/crypt/bcrypt.c index bc9441ccdf5..04c04e89af8 100644 --- a/lib/libc/crypt/bcrypt.c +++ b/lib/libc/crypt/bcrypt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bcrypt.c,v 1.52 2015/01/28 23:33:52 tedu Exp $ */ +/* $OpenBSD: bcrypt.c,v 1.53 2015/07/18 00:56:37 tedu Exp $ */ /* * Copyright (c) 2014 Ted Unangst <tedu@openbsd.org> @@ -385,12 +385,9 @@ char * bcrypt(const char *pass, const char *salt) { static char gencrypted[BCRYPT_HASHSPACE]; - static char gerror[2]; - /* How do I handle errors ? Return ':' */ - strlcpy(gerror, ":", sizeof(gerror)); if (bcrypt_hashpass(pass, salt, gencrypted, sizeof(gencrypted)) != 0) - return gerror; + return NULL; return gencrypted; } |