mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Fix missing string copy
I changed this to a zend_string_copy, but that's not correct in this case, as we still append to the string below. Also fix a test on 32-bit.
This commit is contained in:
parent
50484b59cd
commit
de6cf68ac4
2 changed files with 4 additions and 2 deletions
|
@ -861,7 +861,9 @@ try_again:
|
|||
smart_str_0(&soap_headers);
|
||||
if (Z_TYPE_P(Z_CLIENT_TRACE_P(this_ptr)) == IS_TRUE) {
|
||||
zval_ptr_dtor(Z_CLIENT_LAST_REQUEST_HEADERS_P(this_ptr));
|
||||
ZVAL_STR_COPY(Z_CLIENT_LAST_REQUEST_HEADERS_P(this_ptr), soap_headers.s);
|
||||
/* Need to copy the string here, as we continue appending to soap_headers below. */
|
||||
ZVAL_STRINGL(Z_CLIENT_LAST_REQUEST_HEADERS_P(this_ptr),
|
||||
ZSTR_VAL(soap_headers.s), ZSTR_LEN(soap_headers.s));
|
||||
}
|
||||
smart_str_appendl(&soap_headers, request->val, request->len);
|
||||
smart_str_0(&soap_headers);
|
||||
|
|
|
@ -11,7 +11,7 @@ echo unserialize($data);
|
|||
?>
|
||||
==DONE==
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught TypeError: Cannot assign int to property SoapFault::$faultcode of type ?string in %s:%d
|
||||
Fatal error: Uncaught TypeError: Cannot assign %s to property SoapFault::$faultcode of type ?string in %s:%d
|
||||
Stack trace:
|
||||
#0 %sbug73452.php(4): unserialize('O:9:"SoapFault"...')
|
||||
#1 {main}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue