File tree Expand file tree Collapse file tree 3 files changed +22
-2
lines changed
Expand file tree Collapse file tree 3 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,10 @@ PHP NEWS
88 . Fixed bug GH-15515 (Configure error grep illegal option q). (Peter Kokot)
99 . Fixed bug GH-15514 (Configure error: genif.sh: syntax error). (Peter Kokot)
1010
11+ - DOM:
12+ . Fixed bug GH-15551 (Segmentation fault (access null pointer) in
13+ ext/dom/xml_common.h). (nielsdos)
14+
1115- MySQLnd:
1216 . Fixed bug GH-15432 (Heap corruption when querying a vector). (cmb,
1317 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) /* {{{ */
185185 bool do_curobj_undef = 1 ;
186186
187187 php_dom_iterator * iterator = (php_dom_iterator * )iter ;
188+ if (Z_ISUNDEF (iterator -> curobj )) {
189+ return ;
190+ }
188191
192+ intern = Z_DOMOBJ_P (& iterator -> curobj );
189193 object = & iterator -> intern .data ;
190194 nnmap = Z_DOMOBJ_P (object );
191195 objmap = (dom_nnodemap_object * )nnmap -> ptr ;
192196
193- intern = Z_DOMOBJ_P (& iterator -> curobj );
194-
195197 if (intern != NULL && intern -> ptr != NULL ) {
196198 if (objmap -> nodetype != XML_ENTITY_NODE &&
197199 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