summaryrefslogtreecommitdiff
path: root/ext/standard/crypt.c
diff options
context:
space:
mode:
authorLeigh <leight@gmail.com>2014-10-07 13:12:38 +0100
committerLeigh <leight@gmail.com>2014-10-07 13:12:38 +0100
commitf66013df94f9555f73aea4dd48aee668701f87d9 (patch)
treef1bb4dbd9d8a458ddb7867f97ba9c93aee102f6c /ext/standard/crypt.c
parent4e8c8761206f595691eaeee8a179fa9be286dcf3 (diff)
downloadphp-git-f66013df94f9555f73aea4dd48aee668701f87d9.tar.gz
Apply error-code-salt fix to Windows too
Diffstat (limited to 'ext/standard/crypt.c')
-rw-r--r--ext/standard/crypt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/crypt.c b/ext/standard/crypt.c
index f9920426ea..40b9e6d3b6 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);