Apply error-code-salt fix to Windows too

This commit is contained in:
Leigh 2014-10-07 13:12:38 +01:00
parent 4e8c876120
commit f66013df94

View file

@ -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. # error Data struct used by crypt_r() is unknown. Please report.
# endif # endif
crypt_res = crypt_r(password, salt, &buffer); crypt_res = crypt_r(password, salt, &buffer);
if (!crypt_res) { if (!crypt_res || (salt[0] == '*' && salt[1] == '0')) {
return FAILURE; return FAILURE;
} else { } else {
*result = estrdup(crypt_res); *result = estrdup(crypt_res);