: Bug #39506 :: Archive corrupt with ZipArchive::addFile method
| Bug #39506 | Archive corrupt with ZipArchive::addFile method | ||||
|---|---|---|---|---|---|
| Submitted: | 2006-11-13 23:22 UTC | Modified: | 2011-08-19 12:24 UTC | ||
| From: | hscheidegger at zumbach dot ch | Assigned: | pajoye (profile) | ||
| Status: | Closed | Package: | Zip Related | ||
| PHP Version: | 5.2.0 | OS: | Windows XP | ||
| Private report: | No | CVE-ID: | None | ||
[2006-11-13 23:22 UTC] hscheidegger at zumbach dot ch
Description:
------------
We use PHP 5.2 on Windows XP and Server 2003, not the CGI version.
We are running Apache 2 with php as module and php_zip.dll as extension declared in php.ini.
The following script produces a corrupt zip archive, depending the content of 'TestDoc1.txt':
<?php
$zip = new ZipArchive;
$res = $zip->open( 'test.zip', ZipArchive::CREATE );
if ($res === TRUE) {
$zip->addFile( 'TestDoc1.txt', 'entryname1.txt' );
$zip->close();
echo 'ok';
} else {
echo 'failed';
}
?>
Reproduce code:
---------------
zip archive ok with TestDoc1.txt:
=================================
<body bgcolor="#CED5E5">
<br>
</body>
This is some text, we have to fill the file with nonsense.
zip archive corrupt with TestDoc1.txt:
======================================
<body bgcolor="#CED5E5">
<br>
x
</body>
This is some text, we have to fill the file with nonsense.
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2006-11-14 09:53 UTC] hscheidegger at zumbach dot ch
[2006-11-14 14:37 UTC] pajoye@php.net
[2006-11-14 19:10 UTC] hscheidegger at zumbach dot ch
[2006-11-15 18:00 UTC] hscheidegger at zumbach dot ch
[2006-11-15 19:18 UTC] pajoye@php.net
[2006-11-16 13:13 UTC] hscheidegger at zumbach dot ch
[2006-11-17 18:42 UTC] pajoye@php.net
[2011-08-19 09:48 UTC] claudio dot baratti at gmail dot com
[2011-08-19 10:01 UTC] pajoye@php.net
[2011-08-19 11:34 UTC] claudio dot baratti at gmail dot com
[2011-08-19 11:37 UTC] pajoye@php.net
[2011-08-19 12:11 UTC] claudio dot baratti at amps-llc dot com
[2011-08-19 12:24 UTC] pajoye@php.net