|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53230 extracting file go to infinite loop
Submitted: 2010-11-02 22:06 UTC Modified: 2013-10-15 11:54 UTC
Avg. Score:4.3 ± 0.9
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: vincent dot gibault at gmail dot com Assigned: pajoye (profile)
Status: No Feedback Package: Zip Related
PHP Version: 5.3.3 OS: archlinux x86_64
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: vincent dot gibault at gmail dot com
New email:
PHP Version: OS:


 [2010-11-02 22:06 UTC] vincent dot gibault at gmail dot com
The files joined contained: the script example.php and the archive

I can unzip the with the following commandlines:
unzip example.php
iconv -f UTF16 -t UTF8 data
( show the data xml values ).

But the test script failed to unzip the compressed file.

Test script:
$zip = new ZipArchive ();
$zip->open( '' );
$f = $zip->getStream ('data');
 while (!feof($f)) {
  echo fgets($f);

Expected result:
not to go in infinite loop.

Actual result:
don't work. Please send me an email to have the


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-11-02 22:37 UTC]
-Status: Open +Status: Feedback
 [2010-11-02 22:37 UTC]
Please provide a link to the zip you are using for this bug.
 [2010-11-03 21:25 UTC] vincent dot gibault at gmail dot com
-Status: Feedback +Status: Open
 [2010-11-03 21:25 UTC] vincent dot gibault at gmail dot com

here is the link:
 [2011-02-22 01:29 UTC] tbrasta at gmail dot com
Your file is corrupted. It contains invalid crc, compressed and uncompressed data lenghts of archived file.
It is libzip related bug. More details here
 [2011-11-13 14:07 UTC] dave at bugsplatsoftware dot com
I can provide additional example zip files that fail. 
This problem causes my website performance to plummet 
occaisionally, requiring a restart of Apache.  
I'd be happy to help evaluate fixes, or to know of 
any possible work-arounds.
 [2011-11-13 20:28 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: pajoye
 [2011-11-13 20:28 UTC]
Yes please do, the more we have the better.

I can already reproduce it using thanks :)
 [2011-12-21 06:19 UTC] phpbugs at joern dot heissler dot de
ziplib-0.10 seems to fix that bug.
 [2013-04-01 21:41 UTC]
-Status: Assigned +Status: Feedback
 [2013-10-15 11:54 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Sep 26 23:01:25 2020 UTC