summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sysif.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sysif.c b/sysif.c
index 2f10720e..d845c8ad 100644
--- a/sysif.c
+++ b/sysif.c
@@ -2081,7 +2081,9 @@ static val crypt_wrap(val wkey, val wsalt)
free(key);
free(salt);
- if (hash != 0) {
+ /* libxcrypt puts out two possible failure tokens "*0" or "*1".
+ */
+ if (hash != 0 && strcmp(hash, "*0") != 0 && strcmp(hash, "*1") != 0) {
val ret = string_utf8(hash);
#if HAVE_CRYPT_R
free(cd);