php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46051 SplFileInfo::openFile - memory overlap
Submitted: 2008-09-11 13:46 UTC Modified: 2008-09-11 15:32 UTC
From: felipe@php.net Assigned:
Status: Closed Package: SPL related
PHP Version: 5.3CVS-2008-09-11 (CVS) OS:
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: felipe@php.net
New email:
PHP Version: OS:

 

 [2008-09-11 13:46 UTC] felipe@php.net
Description:
------------
==906== Source and destination overlap in memcpy(0x6777400, 0x6777400, 32)
==906==    at 0x4022ED6: memcpy (mc_replace_strmem.c:116)
==906==    by 0x83FDED2: _estrndup (zend_alloc.c:2444)
==906==    by 0x84286C5: add_assoc_stringl_ex (zend_API.c:1157)
==906==    by 0x8274E3F: spl_filesystem_object_get_debug_info (spl_directory.c:548)
==906==    by 0x8361F20: php_var_dump (var.c:128)
==906==    by 0x836229C: zif_var_dump (var.c:178)
==906==    by 0x845468F: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:315)
==906==    by 0x84427B2: execute (zend_vm_execute.h:104)
==906==    by 0x841CC2E: zend_execute_scripts (zend.c:1197)
==906==    by 0x83C22CC: php_execute_script (main.c:2075)
==906==    by 0x84B4C0C: main (php_cli.c:1130)


Reproduce code:
---------------
<?php

$x = new splfileinfo(__FILE__);

try {
$x->openFile(NULL, NULL, NULL);
} catch (Exception $e) { }

var_dump($x->getPathName());


Expected result:
----------------
string(32) "/home/felipe/public_html/bug.php"

Actual result:
--------------
string(32) "e/felipe/public_html/bug.php"

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-09-11 15:32 UTC] lbarnaud@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-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC