php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48206 Segfault in RecursiveIteratorIterator::current()
Submitted: 2009-05-09 14:01 UTC Modified: 2009-05-09 19:48 UTC
From: matt at raines dot me dot uk Assigned:
Status: Closed Package: SPL related
PHP Version: 5.*, 6CVS (2009-05-09) OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: matt at raines dot me dot uk
New email:
PHP Version: OS:

 

 [2009-05-09 14:01 UTC] matt at raines dot me dot uk
Description:
------------
If you wrap a RecursiveArrayIterator in a RecursiveIteratorIterator and iterate past the end of the array, PHP crashes.

Reproduce code:
---------------
<?php
$i = new RecursiveIteratorIterator(new RecursiveArrayIterator(array()));
$i->next();
var_dump($i->current());
?>

Expected result:
----------------
NULL

Actual result:
--------------
Segmentation fault (core dumped)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-09 19:48 UTC] scottmac@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Sep 18 19:01:51 2019 UTC