Skip to content

Commit

Permalink
Apply error-code-salt fix to Windows too
Browse files Browse the repository at this point in the history
  • Loading branch information
lt committed Oct 7, 2014
1 parent 4e8c876 commit f66013d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/standard/crypt.c
Expand Up @@ -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);
Expand Down

0 comments on commit f66013d

Please sign in to comment.