Commit d8195272df1 for php
commit d8195272df1398085236253dc0b675f825cb8054
Merge: 61c71d90bd7 e6a0bd182a5
Author: Jakub Zelenka <bukka@php.net>
Date: Mon Nov 30 22:36:21 2026 +0100
Merge branch 'PHP-8.5' into PHP-8.6
* PHP-8.5:
ext/soap: fix DTD node being matched as an element
diff --cc NEWS
index fe7af229277,55605a2ba7d..a40133f46f7
--- a/NEWS
+++ b/NEWS
@@@ -291,10 -246,10 +291,12 @@@ PH
- SOAP:
. Fixed bug GH-25267 (NULL dereference in to_xml_any() with integer key).
(lazerg)
+ . Fixed bug GH-25303 (NULL encoder dereference in to_xml_list() error
+ message). (lazerg)
. Fixed NULL dereference in SoapServer::handle() with an empty Body and a
SOAPAction matching an RPC operation. (Jorg Sowa)
+ . Fixed bug GH-25628 (SOAP crashes when importing the XMLDSIG schema).
+ (Jakub Zelenka, ndossche)
- Sockets:
. Fixed bug GH-25530 (socket_last_error() without a socket returns an error
diff --cc ext/soap/php_xml.c
index 12a534e952d,7e8e91dce18..dc1e87816f7
--- a/ext/soap/php_xml.c
+++ b/ext/soap/php_xml.c
@@@ -211,18 -210,22 +211,22 @@@ bool attr_is_equal_ex(xmlAttrPtr node,
if (nsPtr) {
return (strcmp((const char *) nsPtr->href, ns) == 0);
} else {
- return FALSE;
+ return false;
}
} else if (nsPtr) {
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-int node_is_equal_ex(xmlNodePtr node, const char *name, const char *ns)
+bool node_is_equal_ex(xmlNodePtr node, const char *name, const char *ns)
{
+ /* A DTD node can carry the same name but is not an xmlNode. */
+ if (node->type != XML_ELEMENT_NODE) {
- return FALSE;
++ return false;
+ }
if (name == NULL || ((node->name) && strcmp((char*)node->name, name) == 0)) {
if (ns) {
xmlNsPtr nsPtr = node_find_ns(node);