php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46032 PharData::__construct() - wrong memory read
Submitted: 2008-09-09 17:43 UTC Modified: 2008-09-11 03:30 UTC
From: felipe@php.net Assigned: cellog (profile)
Status: Closed Package: PHAR related
PHP Version: 5.2CVS-2008-09-09 (CVS) 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: felipe@php.net
New email:
PHP Version: OS:

 

 [2008-09-09 17:43 UTC] felipe@php.net
Description:
------------
See the "file name" in the exception trace.

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

new phardata('0000000000000000000');


Actual result:
--------------
Fatal error: Uncaught exception 'UnexpectedValueException' with message 'Cannot create phar '0000000000000000000', file extension (or combination) not recognised' in %s:%d
Stack trace:
#0 /home/felipe/public_html/bug.php(3): PharData->__construct('????`hf???????0...')
#1 {main}
  thrown in %s on line %d


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-09-10 17:04 UTC] felipe@php.net
See also:

<?php

$a = __DIR__ .'/mytest';

try {
	new phar($a);
} catch (exception $e) { }

var_dump($a);

try {
	new phar($a);
} catch (exception $e) { }

var_dump($a);


Output:

string(31) ""
string(31) "&#65533;P&#65533;4&#65533;PX4dP&#65533;"

 [2008-09-11 03:30 UTC] cellog@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.

thanks Felipe :)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 00:01:28 2024 UTC