From 671f563b752de548eb77aaa4b0204432d4628d1f Mon Sep 17 00:00:00 2001 From: christos Date: Tue, 27 Dec 2011 22:01:26 +0000 Subject: [PATCH] we want to check against "*0" not "*\0" --- lib/libcrypt/bcrypt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libcrypt/bcrypt.c b/lib/libcrypt/bcrypt.c index 793ff39b08eb..ee38ef715d80 100644 --- a/lib/libcrypt/bcrypt.c +++ b/lib/libcrypt/bcrypt.c @@ -1,4 +1,4 @@ -/* $NetBSD: bcrypt.c,v 1.12 2011/12/27 19:36:10 christos Exp $ */ +/* $NetBSD: bcrypt.c,v 1.13 2011/12/27 22:01:26 christos Exp $ */ /* $OpenBSD: bcrypt.c,v 1.16 2002/02/19 19:39:36 millert Exp $ */ /* @@ -46,7 +46,7 @@ * */ #include -__RCSID("$NetBSD: bcrypt.c,v 1.12 2011/12/27 19:36:10 christos Exp $"); +__RCSID("$NetBSD: bcrypt.c,v 1.13 2011/12/27 22:01:26 christos Exp $"); #include #include @@ -315,7 +315,7 @@ __bcrypt(key, salt) return encrypted; out: /* How do I handle errors ? Return "*0" or "*1" */ - return __UNCONST(salt[0] == '*' && salt[1] == '\0' ? "*1" : "*0"); + return __UNCONST(salt[0] == '*' && salt[1] == '0' ? "*1" : "*0"); } static void