1
0
mirror of https://github.com/php/php-src.git synced 2026-03-27 01:32:22 +01:00

- Fix #51424, crypt() function hangs after 3rd call

This commit is contained in:
Pierre Joye
2010-06-15 09:26:06 +00:00
parent 3d5f729181
commit 8fcd33ed18
2 changed files with 7 additions and 4 deletions

1
NEWS
View File

@@ -141,6 +141,7 @@ PHP NEWS
- Fixed bug #51445 (var_dump() invalid/slow *RECURSION* detection). (Felipe)
- Fixed bug #51435 (Missing ifdefs / logic bug in crypt code cause compile
errors). (Felipe)
- Fixed bug #51424 (crypt() function hangs after 3rd call). (Pierre)
- Fixed bug #51394 (Error line reported incorrectly if error handler throws an
exception). (Stas)
- Fixed bug #51393 (DateTime::createFromFormat() fails if format string contains

View File

@@ -81,11 +81,13 @@ void _crypt_extended_init_r(void)
tsrm_mutex_lock(php_crypt_extended_init_lock);
#endif
if (initialized) {
return;
} else {
if (!initialized) {
#ifdef PHP_WIN32
InterlockedIncrement(initialized);
#elif (defined(__GNUC__) && (__GNUC__ >= 4 && __GNUC_MINOR >= 2))
__sync_fetch_and_add(&initialized, 1);
#endif
_crypt_extended_init();
initialized = 1;
}
#ifdef ZTS
tsrm_mutex_unlock(php_crypt_extended_init_lock);