From: foobar Date: Sun, 20 Nov 2005 18:06:09 +0000 (+0000) Subject: - Fixed bug #35243 (php_mblen() crashes when compiled with thread-safety on Linux) X-Git-Tag: RELEASE_2_0_2~150 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=895e795b53a1e3d9f925546ba1829c420cd82832;p=php - Fixed bug #35243 (php_mblen() crashes when compiled with thread-safety on Linux) --- diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 691c78c9e1..0a999a34ba 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -957,6 +957,10 @@ static void basic_globals_ctor(php_basic_globals *basic_globals_p TSRMLS_DC) memset(&BG(url_adapt_state), 0, sizeof(BG(url_adapt_state))); memset(&BG(url_adapt_state_ex), 0, sizeof(BG(url_adapt_state_ex))); + +#if defined(_REENTRANT) && defined(HAVE_MBRLEN) && defined(HAVE_MBSTATE_T) + memset(&BG(mblen_state), 0, sizeof(BG(mblen_state))); +#endif BG(incomplete_class) = php_create_incomplete_class(TSRMLS_C); }