]> granicus.if.org Git - php/commitdiff
- Fixed bug #35243 (php_mblen() crashes when compiled with thread-safety on Linux)
authorfoobar <sniper@php.net>
Sun, 20 Nov 2005 18:06:09 +0000 (18:06 +0000)
committerfoobar <sniper@php.net>
Sun, 20 Nov 2005 18:06:09 +0000 (18:06 +0000)
ext/standard/basic_functions.c

index 691c78c9e11b835e1e9445c1a6e43c661b259d45..0a999a34bac3b79be9398534e4997c58932bde72 100644 (file)
@@ -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);
 }