com php-src: Merge branch 'PHP-5.6': ext/standard/crypt.c
| From: | Stanislav Malyshev | Date: | Mon, 01 Dec 2014 05:47:40 +0000 |
| Subject: | com php-src: Merge branch 'PHP-5.6': ext/standard/crypt.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-83429@lists.php.net to get a copy of this message | ||
Commit: bfc8d297be96b10f82190e58d8de67e101c33573
Author: Stanislav Malyshev <stas@php.net> Sun, 30 Nov 2014 21:41:04 -0800
Parents: f3faa205c757e49a43f6672fc28aa296b4b65e11 720ba679485cb7120911af8013b7b6ab72a47884
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=bfc8d297be96b10f82190e58d8de67e101c33573
Log:
Merge branch 'PHP-5.6'
* PHP-5.6:
update news
update news
update NEWS
Apply error-code-salt fix to Windows too
Bug fixes in light of failing bcrypt tests
Add tests from 1.3. Add missing tests..
Upgrade crypt_blowfish to version 1.3
Apply error-code-salt fix to Windows too
Bug fixes in light of failing bcrypt tests
Add tests from 1.3. Add missing tests.
Upgrade crypt_blowfish to version 1.3
Conflicts:
ext/standard/crypt.c
Changed paths:
MM ext/standard/crypt.c
Diff:
diff --cc ext/standard/crypt.c
index 7fae04f,687befb..efc4248
--- a/ext/standard/crypt.c
+++ b/ext/standard/crypt.c
@@@ -219,11 -218,11 +218,11 @@@ PHPAPI zend_string *php_crypt(const cha
_crypt_extended_init_r();
crypt_res = _crypt_extended_r(password, salt, &buffer);
- if (!crypt_res) {
+ if (!crypt_res || (salt[0] == '*' && salt[1] == '0')) {
- return FAILURE;
+ return NULL;
} else {
- *result = estrdup(crypt_res);
- return SUCCESS;
+ result = zend_string_init(crypt_res, strlen(crypt_res), 0);
+ return result;
}
}
}
@@@ -240,11 -239,11 +239,11 @@@
# error Data struct used by crypt_r() is unknown. Please report.
# endif
crypt_res = crypt_r(password, salt, &buffer);
- if (!crypt_res) {
- return FAILURE;
+ if (!crypt_res || (salt[0] == '*' && salt[1] == '0')) {
- return FAILURE;
++ return NULL;
} else {
- *result = estrdup(crypt_res);
- return SUCCESS;
+ result = zend_string_init(crypt_res, strlen(crypt_res), 0);
+ return result;
}
}
# endif