File tree 3 files changed +22
-2
lines changed
3 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,10 @@ PHP NEWS
8
8
. Fixed bug GH-15515 (Configure error grep illegal option q). (Peter Kokot)
9
9
. Fixed bug GH-15514 (Configure error: genif.sh: syntax error). (Peter Kokot)
10
10
11
+ - DOM:
12
+ . Fixed bug GH-15551 (Segmentation fault (access null pointer) in
13
+ ext/dom/xml_common.h). (nielsdos)
14
+
11
15
- MySQLnd:
12
16
. Fixed bug GH-15432 (Heap corruption when querying a vector). (cmb,
13
17
Kamil Tekiela)
Original file line number Diff line number Diff line change @@ -185,13 +185,15 @@ static void php_dom_iterator_move_forward(zend_object_iterator *iter) /* {{{ */
185
185
bool do_curobj_undef = 1 ;
186
186
187
187
php_dom_iterator * iterator = (php_dom_iterator * )iter ;
188
+ if (Z_ISUNDEF (iterator -> curobj )) {
189
+ return ;
190
+ }
188
191
192
+ intern = Z_DOMOBJ_P (& iterator -> curobj );
189
193
object = & iterator -> intern .data ;
190
194
nnmap = Z_DOMOBJ_P (object );
191
195
objmap = (dom_nnodemap_object * )nnmap -> ptr ;
192
196
193
- intern = Z_DOMOBJ_P (& iterator -> curobj );
194
-
195
197
if (intern != NULL && intern -> ptr != NULL ) {
196
198
if (objmap -> nodetype != XML_ENTITY_NODE &&
197
199
objmap -> nodetype != XML_NOTATION_NODE ) {
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ GH-15551 (Segmentation fault (access null pointer) in ext/dom/xml_common.h)
3
+ --EXTENSIONS--
4
+ dom
5
+ --FILE--
6
+ <?php
7
+ $ fragment = new DOMDocumentFragment ();
8
+ $ nodes = $ fragment ->childNodes ;
9
+ $ iter = $ nodes ->getIterator ();
10
+ $ iter ->next ();
11
+ var_dump ($ iter ->valid ());
12
+ ?>
13
+ --EXPECT--
14
+ bool(false)
You can’t perform that action at this time.
0 commit comments