|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-05-05 21:43 UTC] pajoye@php.net
[2006-05-05 21:44 UTC] pajoye@php.net
[2006-05-05 22:28 UTC] pajoye@php.net
[2006-05-06 02:15 UTC] humbads at alum dot mit dot edu
[2006-05-06 02:17 UTC] humbads at alum dot mit dot edu
[2006-05-06 03:37 UTC] humbads at alum dot mit dot edu
[2010-12-20 14:51 UTC] jani@php.net
-Package: ZZiplib Related
+Package: Zip Related
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 18:00:02 2025 UTC |
Description: ------------ When using zip_entry_read to decompress a zip entry containing a null byte, the function only returns data up to the first null byte in the decompressed file. Bug does not occur on PHP 5.1.2 for Windows XP. Reproduce code: --------------- <?php dl("zip.so"); // test.zip contains one file with a null byte in the middle $zipfile = zip_open("onejpg.zip"); $zipentry = zip_read($zipfile); zip_entry_open($zipfile, $zipentry); $content = zip_entry_read($zipentry, zip_entry_filesize($zipentry)); print "filesize: ".filesize("onejpg.jpg")."\n"; print "variable: "; var_dump($content); zip_entry_close($zipentry); zip_close($zipfile); ?> Expected result: ---------------- var_dump should show a string with the same length as the file size. To download onejpg.zip and onejpg.jpg, go here: http://www.somacon.com/p258.php http://www.somacon.com/p257.php Actual result: -------------- var_dump only shows length 4, which is the length up to the null byte.