-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug #77586 - phar_tar_writeheaders_int() buffer overflow
- Loading branch information
Showing
5 changed files
with
37 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--TEST-- | ||
Bug #77586 Symbolic link names in tar-formatted phar must be less than 100 bytes. | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("phar") || true /* blocked by bug 65332 */) die("skip"); ?> | ||
--FILE-- | ||
<?php | ||
$dir = __DIR__."/bug77586"; | ||
$phar = new PharData($dir . "/bug77586.tar"); | ||
$phar->buildFromDirectory($dir . "/files"); | ||
?> | ||
--CLEAN-- | ||
<?php | ||
$dir = __DIR__."/bug77586"; | ||
unlink($dir . "/bug77586.tar"); | ||
?> | ||
--EXPECTF-- | ||
Fatal error: Uncaught PharException: tar-based phar "%s/bug77586.tar" cannot be created, link "%s" is too long for format %s | ||
Stack trace: | ||
#0 %s/bug77586.php(%d): PharData->buildFromDirectory('%s') | ||
#1 {main} | ||
thrown in %s/bug77586.php %s on line %d |
1 change: 1 addition & 0 deletions
1
...Ynpzg-ZDycSpWN3Ne3kacltOSE-EqfhStJ1EoBpGuoua6VE-dne29hvpNWXiVbepwIf8-NRHWM9LITLo3nXZnKVNC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
target |