From f66013df94f9555f73aea4dd48aee668701f87d9 Mon Sep 17 00:00:00 2001 From: Leigh Date: Tue, 7 Oct 2014 13:12:38 +0100 Subject: [PATCH] Apply error-code-salt fix to Windows too --- ext/standard/crypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/standard/crypt.c b/ext/standard/crypt.c index f9920426eaf..40b9e6d3b6a 100644 --- a/ext/standard/crypt.c +++ b/ext/standard/crypt.c @@ -239,7 +239,7 @@ PHPAPI int php_crypt(const char *password, const int pass_len, const char *salt, # error Data struct used by crypt_r() is unknown. Please report. # endif crypt_res = crypt_r(password, salt, &buffer); - if (!crypt_res) { + if (!crypt_res || (salt[0] == '*' && salt[1] == '0')) { return FAILURE; } else { *result = estrdup(crypt_res);