php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76367 NoRewindIterator segfault 11
Submitted: 2018-05-22 17:21 UTC Modified: 2018-05-22 21:10 UTC
From: pyscht at gmail dot com Assigned:
Status: Closed Package: SPL related
PHP Version: 7.2.5 OS: linux/macOS
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: pyscht at gmail dot com
New email:
PHP Version: OS:

 

 [2018-05-22 17:21 UTC] pyscht at gmail dot com
Description:
------------
Segmentation fault when trying to get the current from an invalid iterator

Test script:
---------------
$arr = [1,3,55,66,43,6];

$iter = new NoRewindIterator(new ArrayIterator($arr));

while($iter->valid()) {
    $iter->next();
}

var_dump($iter->current()); //Segmentation fault: 11 here!

Actual result:
--------------
Segmentation fault: 11

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-05-22 21:10 UTC] cmb@php.net
-Package: *Programming Data Structures +Package: SPL related
 [2018-05-23 06:46 UTC] laruence@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=8f221bdec0e1a81ef4471f926cf0b0f23724204c
Log: Fixed bug #76367 (NoRewindIterator segfault 11)
 [2018-05-23 06:46 UTC] laruence@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 04:01:28 2024 UTC