#46032 [Opn->Csd]: PharData::__construct() - wrong memory read

From: Date: Thu, 11 Sep 2008 03:30:23 +0000
Subject: #46032 [Opn->Csd]: PharData::__construct() - wrong memory read
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-128863@lists.php.net to get a copy of this message
ID: 46032 Updated by: cellog@php.net Reported By: felipe@php.net -Status: Open +Status: Closed Bug Type: PHAR related Operating System: * PHP Version: 5.2CVS-2008-09-09 (CVS) -Assigned To: +Assigned To: cellog New Comment: 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 :) Previous Comments: ------------------------------------------------------------------------ [2008-09-10 17:04:13] 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-09 17:43:39] 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46032&edit=1

« previous php.bugs (#128863) next »