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 @@ -184,13 +184,15 @@ static void php_dom_iterator_move_forward(zend_object_iterator *iter) /* {{{ */
184
184
bool do_curobj_undef = 1 ;
185
185
186
186
php_dom_iterator * iterator = (php_dom_iterator * )iter ;
187
+ if (Z_ISUNDEF (iterator -> curobj )) {
188
+ return ;
189
+ }
187
190
191
+ intern = Z_DOMOBJ_P (& iterator -> curobj );
188
192
object = & iterator -> intern .data ;
189
193
nnmap = Z_DOMOBJ_P (object );
190
194
objmap = (dom_nnodemap_object * )nnmap -> ptr ;
191
195
192
- intern = Z_DOMOBJ_P (& iterator -> curobj );
193
-
194
196
if (intern != NULL && intern -> ptr != NULL ) {
195
197
if (objmap -> nodetype != XML_ENTITY_NODE &&
196
198
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