php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49108 2nd scan_dir produces seg fault
Submitted: 2009-07-30 10:59 UTC Modified: 2009-07-30 12:07 UTC
From: michael202 at gmx dot de Assigned: felipe (profile)
Status: Closed Package: Reproducible crash
PHP Version: 5.3.0 OS: Suse Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
7 + 6 = ?
Subscribe to this entry?

 
 [2009-07-30 10:59 UTC] michael202 at gmx dot de
Description:
------------
the second call to scandir() crashes the script with a "Segmentation fault".



Reproduce code:
---------------
<?php
    $dir1 = 'ftp://anonymous:anonymous@mirrors.kernel.org/suse/';

    $f = scandir($dir1 . 'i386/');
    echo count($f) . "\n";


    $f = scandir($dir1 . 'noarch/');
    echo count($f) . "\n";



Expected result:
----------------
# php php_scandir_segfault.php
5
1



Actual result:
--------------
# php php_scandir_segfault.php
5
Segmentation fault


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-30 12:06 UTC] svn@php.net
Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&revision=286555
Log: - Fixed bug #49108 (2nd scan_dir produces seg fault)
 [2009-07-30 12:07 UTC] felipe@php.net
Fixed in 5.3+
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 05:01:29 2024 UTC