Skip to content

Commit 29b38a1

Browse files
realFlowControlnielsdos
authored andcommitted
Fix GH-19226: Segfault when spawning new thread in soap extension
Closes GH-19228.
1 parent 2645663 commit 29b38a1

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ PHP NEWS
1919
. Fixed GH-19197: build broken with ZEND_STRL usage with memcpy
2020
when implemented as macro. (David Carlier)
2121

22+
- Soap:
23+
. Fixed bug GH-19226 (Segfault when spawning new thread in soap extension).
24+
(Florian Engelhardt)
25+
2226
- Sockets:
2327
. socket_set_option for multicast context throws a ValueError
2428
when the socket family is not of AF_INET/AF_INET6 family. (David Carlier)

ext/soap/soap.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,6 @@ static void php_soap_init_globals(zend_soap_globals *soap_globals)
453453
soap_globals->soap_version = SOAP_1_1;
454454
soap_globals->mem_cache = NULL;
455455
soap_globals->ref_map = NULL;
456-
soap_globals->lang_en = zend_string_init_interned(ZEND_STRL("en"), true);
457456
}
458457

459458
PHP_MSHUTDOWN_FUNCTION(soap)
@@ -553,6 +552,8 @@ PHP_MINIT_FUNCTION(soap)
553552
old_error_handler = zend_error_cb;
554553
zend_error_cb = soap_error_handler;
555554

555+
SOAP_GLOBAL(lang_en) = zend_string_init_interned(ZEND_STRL("en"), true);
556+
556557
return SUCCESS;
557558
}
558559

@@ -4205,7 +4206,7 @@ static xmlNodePtr serialize_zval(zval *val, sdlParamPtr param, const char *param
42054206
}
42064207
xmlParam = master_to_xml(enc, val, style, parent);
42074208
zval_ptr_dtor(&defval);
4208-
if (xmlParam != NULL) {
4209+
if (xmlParam != NULL) {
42094210
if (xmlParam->name == NULL || strcmp((char*)xmlParam->name, "BOGUS") == 0) {
42104211
xmlNodeSetName(xmlParam, BAD_CAST(paramName));
42114212
}

0 commit comments

Comments
 (0)