-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* PHP-8.3: Fix GH-17139: Fix zip_entry_name() crash on invalid entry
- Loading branch information
Showing
4 changed files
with
28 additions
and
1 deletion.
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,19 @@ | ||
--TEST-- | ||
GH-17139 - zip_entry_name() crash | ||
--EXTENSIONS-- | ||
zip | ||
--FILE-- | ||
<?php | ||
$zip = zip_open(__DIR__."/test_procedural.zip"); | ||
if (!is_resource($zip)) die("Failure"); | ||
// no need to bother looping over, the entry name should point to a dangling address from the first iteration | ||
$zip = zip_read($zip); | ||
var_dump(zip_entry_name($zip)); | ||
?> | ||
--EXPECTF-- | ||
Deprecated: Function zip_open() is deprecated since 8.0, use ZipArchive::open() instead in %s on line %d | ||
|
||
Deprecated: Function zip_read() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s on line %d | ||
|
||
Deprecated: Function zip_entry_name() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s on line %d | ||
bool(false) |