Skip to content

Commit 143cc67

Browse files
committed
Merge branch 'PHP-5.6'
* PHP-5.6: Added type checks Update NEWS Conflicts: NEWS ext/soap/php_encoding.c ext/soap/soap.c
2 parents dd50ed8 + c433f19 commit 143cc67

File tree

3 files changed

+160
-9
lines changed

3 files changed

+160
-9
lines changed

NEWS

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,152 @@
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? 20??, PHP 7.0.0
44

5+
<<<<<<< HEAD
56
- CLI server:
67
. Refactor MIME type handling to use a hash table instead of linear search.
78
(Adam)
89
. Update the MIME type list from the one shipped by Apache HTTPD. (Adam)
10+
=======
11+
- Core:
12+
. Fixed bug #69139 (Crash in gc_zval_possible_root on unserialize).
13+
(Laruence)
14+
. Fixed bug #69121 (Segfault in get_current_user when script owner is not
15+
in passwd with ZTS build). (dan at syneto dot net)
16+
. Fixed bug #65593 (Segfault when calling ob_start from output buffering
17+
callback). (Mike)
18+
. Fixed bug #68986 (pointer returned by php_stream_fopen_temporary_file
19+
not validated in memory.c). (nayana at ddproperty dot com)
20+
. Fixed bug #68166 (Exception with invalid character causes segv). (Rasmus)
21+
. Fixed bug #69141 (Missing arguments in reflection info for some builtin
22+
functions). (kostyantyn dot lysyy at oracle dot com)
23+
24+
- cURL:
25+
. Fixed bug #69088 (PHP_MINIT_FUNCTION does not fully initialize cURL on
26+
Win32). (Grant Pannell)
27+
. Add CURLPROXY_SOCKS4A and CURLPROXY_SOCKS5_HOSTNAME constants if supported
28+
by libcurl. (Linus Unneback)
29+
30+
- ODBC:
31+
. Fixed bug #68964 (Allowed memory size exhausted with odbc_exec). (Anatol)
32+
33+
- Opcache:
34+
. Fixed bug #69125 (Array numeric string as key). (Laruence)
35+
. Fixed bug #69038 (switch(SOMECONSTANT) misbehaves). (Laruence)
36+
37+
- OpenSSL:
38+
. Fixed bug #68912 (Segmentation fault at openssl_spki_new). (Laruence)
39+
. Fixed bug #61285, #68329, #68046, #41631 (encrypted streams don't observe
40+
socket timeouts). (Brad Broerman)
41+
42+
- pgsql:
43+
. Fixed bug #68638 (pg_update() fails to store infinite values).
44+
(william dot welter at 4linux dot com dot br, Laruence)
45+
46+
- Readline:
47+
. Fixed bug #69054 (Null dereference in readline_(read|write)_history() without
48+
parameters). (Laruence)
49+
50+
- SOAP:
51+
. Fixed bug #69085 (SoapClient's __call() type confusion through
52+
unserialize()). (andrea dot palazzo at truel dot it, Laruence)
53+
54+
- SPL:
55+
. Fixed bug #69108 ("Segmentation fault" when (de)serializing
56+
SplObjectStorage). (Laruence)
57+
. Fixed bug #68557 (RecursiveDirectoryIterator::seek(0) broken after
58+
calling getChildren()). (Julien)
59+
60+
- CGI:
61+
. Fixed bug #69015 (php-cgi's getopt does not see $argv). (Laruence)
62+
63+
- CLI:
64+
. Fixed bug #67741 (auto_prepend_file messes up __LINE__). (Reeze Xia)
65+
66+
- FPM:
67+
. Fixed bug #68822 (request time is reset too early). (honghu069 at 163 dot com)
68+
69+
19 Feb 2015, PHP 5.6.6
70+
71+
- Core:
72+
. Removed support for multi-line headers, as the are deprecated by RFC 7230.
73+
(Stas)
74+
. Fixed bug #67068 (getClosure returns somethings that's not a closure).
75+
(Danack at basereality dot com)
76+
. Fixed bug #68942 (Use after free vulnerability in unserialize() with
77+
DateTimeZone). (CVE-2015-0273) (Stas)
78+
. Fixed bug #68925 (Mitigation for CVE-2015-0235 – GHOST: glibc gethostbyname
79+
buffer overflow). (Stas)
80+
. Fixed Bug #67988 (htmlspecialchars() does not respect default_charset
81+
specified by ini_set) (Yasuo)
82+
. Added NULL byte protection to exec, system and passthru. (Yasuo)
83+
84+
- Dba:
85+
. Fixed bug #68711 (useless comparisons). (bugreports at internot dot info)
86+
87+
- Enchant:
88+
. Fixed bug #68552 (heap buffer overflow in enchant_broker_request_dict()).
89+
(Antony)
90+
91+
- Fileinfo:
92+
. Fixed bug #68827 (Double free with disabled ZMM). (Joshua Rogers)
93+
. Fixed bug #67647 (Bundled libmagic 5.17 does not detect quicktime files
94+
correctly). (Anatol)
95+
. Fixed bug #68731 (finfo_buffer doesn't extract the correct mime with some
96+
gifs). (Anatol)
97+
98+
- FPM:
99+
. Fixed bug #66479 (Wrong response to FCGI_GET_VALUES). (Frank Stolle)
100+
. Fixed bug #68571 (core dump when webserver close the socket).
101+
(redfoxli069 at gmail dot com, Laruence)
102+
103+
- JSON:
104+
. Fixed bug #50224 (json_encode() does not always encode a float as a float)
105+
by adding JSON_PRESERVE_ZERO_FRACTION. (Juan Basso)
106+
107+
- LIBXML:
108+
. Fixed bug #64938 (libxml_disable_entity_loader setting is shared
109+
between threads). (Martin Jansen)
110+
111+
- Mysqli:
112+
. Fixed bug #68114 (linker error on some OS X machines with fixed
113+
width decimal support) (Keyur Govande)
114+
. Fixed bug #68657 (Reading 4 byte floats with Mysqli and libmysqlclient
115+
has rounding errors) (Keyur Govande)
116+
117+
- Opcache:
118+
. Fixed bug with try blocks being removed when extended_info opcode
119+
generation is turned on. (Laruence)
120+
121+
- PDO_mysql:
122+
. Fixed bug #68750 (PDOMysql with mysqlnd does not allow the usage of
123+
named pipes). (steffenb198 at aol dot com)
124+
125+
- Phar:
126+
. Fixed bug #68901 (use after free). (bugreports at internot dot info)
127+
128+
- Pgsql:
129+
. Fixed Bug #65199 (pg_copy_from() modifies input array variable) (Yasuo)
130+
131+
- Session:
132+
. Fixed bug #68941 (mod_files.sh is a bash-script) (bugzilla at ii.nl, Yasuo)
133+
. Fixed Bug #66623 (no EINTR check on flock) (Yasuo)
134+
. Fixed bug #68063 (Empty session IDs do still start sessions) (Yasuo)
135+
136+
- Sqlite3:
137+
. Fixed bug #68260 (SQLite3Result::fetchArray declares wrong
138+
required_num_args). (Julien)
139+
140+
- Standard:
141+
. Fixed bug #65272 (flock() out parameter not set correctly in windows).
142+
(Daniel Lowrey)
143+
. Fixed bug #69033 (Request may get env. variables from previous requests
144+
if PHP works as FastCGI). (Anatol)
145+
146+
- Streams:
147+
. Fixed bug which caused call after final close on streams filter. (Bob)
148+
149+
22 Jan 2015, PHP 5.6.5
150+
>>>>>>> PHP-5.6
9151

10152
- Core:
11153
. Fixed bug #68933 (Invalid read of size 8 in zend_std_read_property).

ext/soap/php_encoding.c

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -388,12 +388,15 @@ static xmlNodePtr master_to_xml_int(encodePtr encode, zval *data, int style, xml
388388
encodePtr enc = NULL;
389389
HashTable *ht = Z_OBJPROP_P(data);
390390

391-
if ((ztype = zend_hash_str_find(ht, "enc_type", sizeof("enc_type")-1)) == NULL) {
391+
if ((ztype = zend_hash_str_find(ht, "enc_type", sizeof("enc_type")-1)) == NULL ||
392+
Z_TYPE_P(ztype) != IS_LONG) {
392393
soap_error0(E_ERROR, "Encoding: SoapVar has no 'enc_type' property");
393394
}
394395

395-
if ((zstype = zend_hash_str_find(ht, "enc_stype", sizeof("enc_stype")-1)) != NULL) {
396-
if ((zns = zend_hash_str_find(ht, "enc_ns", sizeof("enc_ns")-1)) != NULL) {
396+
if ((zstype = zend_hash_str_find(ht, "enc_stype", sizeof("enc_stype")-1)) != NULL &&
397+
Z_TYPE_P(zstype) == IS_STRING) {
398+
if ((zns = zend_hash_str_find(ht, "enc_ns", sizeof("enc_ns")-1)) != NULL &&
399+
Z_TYPE_P(zns) == IS_STRING) {
397400
enc = get_encoder(SOAP_GLOBAL(sdl), Z_STRVAL_P(zns), Z_STRVAL_P(zstype));
398401
} else {
399402
zns = NULL;
@@ -423,19 +426,23 @@ static xmlNodePtr master_to_xml_int(encodePtr encode, zval *data, int style, xml
423426
node = master_to_xml(enc, zdata, style, parent);
424427

425428
if (style == SOAP_ENCODED || (SOAP_GLOBAL(sdl) && encode != enc)) {
426-
if ((ztype = zend_hash_str_find(ht, "enc_stype", sizeof("enc_stype")-1)) != NULL) {
427-
if ((zns = zend_hash_str_find(ht, "enc_ns", sizeof("enc_ns")-1)) != NULL) {
429+
if ((zstype = zend_hash_str_find(ht, "enc_stype", sizeof("enc_stype")-1)) != NULL &&
430+
Z_TYPE_P(zstype) == IS_STRING) {
431+
if ((zns = zend_hash_str_find(ht, "enc_ns", sizeof("enc_ns")-1)) != NULL &&
432+
Z_TYPE_P(zns) == IS_STRING) {
428433
set_ns_and_type_ex(node, Z_STRVAL_P(zns), Z_STRVAL_P(zstype));
429434
} else {
430435
set_ns_and_type_ex(node, NULL, Z_STRVAL_P(zstype));
431436
}
432437
}
433438
}
434439

435-
if ((zname = zend_hash_str_find(ht, "enc_name", sizeof("enc_name")-1)) != NULL) {
440+
if ((zname = zend_hash_str_find(ht, "enc_name", sizeof("enc_name")-1)) != NULL &&
441+
Z_TYPE_P(zname) == IS_STRING) {
436442
xmlNodeSetName(node, BAD_CAST(Z_STRVAL_P(zname)));
437443
}
438-
if ((znamens = zend_hash_str_find(ht, "enc_namens", sizeof("enc_namens")-1)) != NULL) {
444+
if ((znamens = zend_hash_str_find(ht, "enc_namens", sizeof("enc_namens")-1)) != NULL &&
445+
Z_TYPE_P(znamens) == IS_STRING) {
439446
xmlNsPtr nsp = encode_add_ns(node, Z_STRVAL_P(znamens));
440447
xmlSetNs(node, nsp);
441448
}

ext/soap/soap.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3985,7 +3985,8 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function
39853985
}
39863986

39873987
if (version == SOAP_1_1) {
3988-
if ((tmp = zend_hash_str_find(prop, "faultcode", sizeof("faultcode")-1)) != NULL) {
3988+
if ((tmp = zend_hash_str_find(prop, "faultcode", sizeof("faultcode")-1)) != NULL &&
3989+
Z_TYPE_P(tmp) == IS_STRING) {
39893990
xmlNodePtr node = xmlNewNode(NULL, BAD_CAST("faultcode"));
39903991
zend_string *str = php_escape_html_entities((unsigned char*)Z_STRVAL_P(tmp), Z_STRLEN_P(tmp), 0, 0, NULL);
39913992
xmlAddChild(param, node);
@@ -4009,7 +4010,8 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function
40094010
}
40104011
detail_name = "detail";
40114012
} else {
4012-
if ((tmp = zend_hash_str_find(prop, "faultcode", sizeof("faultcode")-1)) != NULL) {
4013+
if ((tmp = zend_hash_str_find(prop, "faultcode", sizeof("faultcode")-1)) != NULL &&
4014+
Z_TYPE_P(tmp) == IS_STRING) {
40134015
xmlNodePtr node = xmlNewChild(param, ns, BAD_CAST("Code"), NULL);
40144016
zend_string *str = php_escape_html_entities((unsigned char*)Z_STRVAL_P(tmp), Z_STRLEN_P(tmp), 0, 0, NULL);
40154017
node = xmlNewChild(node, ns, BAD_CAST("Value"), NULL);

0 commit comments

Comments
 (0)