summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/login.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/login.c b/utils/login.c
index 7bef4c19..cab40589 100644
--- a/utils/login.c
+++ b/utils/login.c
@@ -542,6 +542,10 @@ main(int argc, char *argv[])
encrypted = crypt (unencrypted, password);
/* Paranoia may destroya. */
memset (unencrypted, 0, strlen (unencrypted));
+
+ if (! encrypted)
+ /* Something went wrong. */
+ fail (51, errno, "Password encryption failed", 0);
}
else
encrypted = unencrypted;