File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ PHP NEWS
32
32
(Arnaud)
33
33
. Fixed bug GH-19831 (function JIT may not deref property value). (Arnaud)
34
34
35
+ - SimpleXML:
36
+ . Fixed bug GH-19988 (zend_string_init with NULL pointer in simplexml (UB)).
37
+ (nielsdos)
38
+
35
39
- Soap:
36
40
. Fixed bug GH-19784 (SoapServer memory leak). (nielsdos)
37
41
Original file line number Diff line number Diff line change @@ -1629,7 +1629,7 @@ PHP_METHOD(SimpleXMLElement, getName)
1629
1629
node = php_sxe_get_first_node_non_destructive (sxe , node );
1630
1630
if (node ) {
1631
1631
namelen = xmlStrlen (node -> name );
1632
- RETURN_STRINGL (( char * ) node -> name , namelen );
1632
+ RETURN_STRINGL_FAST (( const char * ) node -> name , namelen );
1633
1633
} else {
1634
1634
RETURN_EMPTY_STRING ();
1635
1635
}
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ GH-19988 (zend_string_init with NULL pointer in simplexml (UB))
3
+ --EXTENSIONS--
4
+ simplexml
5
+ xsl
6
+ --CREDITS--
7
+ YuanchengJiang
8
+ --FILE--
9
+ <?php
10
+ $ sxe = simplexml_load_file (__DIR__ . '/53965/collection.xml ' );
11
+ $ processor = new XSLTProcessor ;
12
+ $ dom = new DOMDocument ;
13
+ $ dom ->load (__DIR__ . '/53965/collection.xsl ' );
14
+ $ processor ->importStylesheet ($ dom );
15
+ $ result = $ processor ->transformToDoc ($ sxe , SimpleXMLElement::class);
16
+ var_dump ($ result ->getName ());
17
+ ?>
18
+ --EXPECT--
19
+ string(0) ""
You can’t perform that action at this time.
0 commit comments