|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2018-12-20 10:21 UTC] lars at larsegon dot se
Description:
------------
When trying to add the empty directory '/' to a phar archive PHP throws a fatal error:
PHP Fatal error: Possible integer overflow in memory allocation (1 * 18446744073709551615 + 1) in /path/to/my/script.php on line 91
The same action works in ZipArchive, i.e. this works:
$zip = new \ZipArchive;
$zip->open(tempnam(sys_get_temp_dir(), "phptest"));
$zip->addEmptyDir("/");
Test script:
---------------
$tar = new \PharData("/tmp/phptempfile");
$tar->addEmptyDir("/");
// Fatal error Possible Integer overflow
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 21:00:01 2025 UTC |
The following pull request has been associated: Patch Name: Fix #77322: PharData::addEmptyDir('/') Possible integer overflow On GitHub: https://github.com/php/php-src/pull/6508 Patch: https://github.com/php/php-src/pull/6508.patch