Skip to content

Commit db77890

Browse files
author
foobar
committed
MFH: - Fixed bug #35243 (php_mblen() crashes when compiled with thread-safety on Linux)
1 parent abe3643 commit db77890

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

NEWS

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ PHP NEWS
44
- Fixed bug #35293 (PDO segfaults when using persistent connections). (Tony)
55
- Fixed bug #35278 (Multiple virtual() calls crash Apache 2 php module). (Ilia)
66
- Fixed bug #35273 (Error in mapping soap - java types). (Dmitry)
7+
- Fixed bug #35243 (php_mblen() crashes when compiled with thread-safety
8+
on Linux). (Patch: shulmanb at il dot ibm dot com, Jani)
79
- Fixed bug #33153 (crash in mssql_next result). (Frank)
810
- Fixed bug #33963 (mssql_bind() fails on input parameters). (Frank)
911
- Fixed bug #33201 (Crash when fetching some data types). (Frank)

ext/standard/basic_functions.c

+4
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,10 @@ static void basic_globals_ctor(php_basic_globals *basic_globals_p TSRMLS_DC)
953953

954954
memset(&BG(url_adapt_state), 0, sizeof(BG(url_adapt_state)));
955955
memset(&BG(url_adapt_state_ex), 0, sizeof(BG(url_adapt_state_ex)));
956+
957+
#if defined(_REENTRANT) && defined(HAVE_MBRLEN) && defined(HAVE_MBSTATE_T)
958+
memset(&BG(mblen_state), 0, sizeof(BG(mblen_state)));
959+
#endif
956960

957961
BG(incomplete_class) = php_create_incomplete_class(TSRMLS_C);
958962
}

0 commit comments

Comments
 (0)