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
 [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

Pull Requests

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: Sat Dec 21 11:01:30 2024 UTC