php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56798 php crash on zip module
Submitted: 2006-01-25 11:14 UTC Modified: 2006-02-28 19:38 UTC
From: bolk at hitv dot ru Assigned: pajoye (profile)
Status: Closed Package: zip (PECL)
PHP Version: 5.1.1 OS: Linux Fedora Core 4
Private report: No CVE-ID: None
 [2006-01-25 11:14 UTC] bolk at hitv dot ru
Description:
------------
rdev=makedev(136, 2), st_atime=2006/01/25-19:12:46, st_mtime=2006/01/25-19:12:46, st_ctime=2006/01/25-18:27:50}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb2259000
write(1, "Name:               index.html\n", 31Name:               index.html
) = 31
write(1, "Actual Filesize:    4109\n", 25Actual Filesize:    4109
) = 25
write(1, "Compressed Size:    1523\n", 25Compressed Size:    1523
) = 25
write(1, "Compression Method: deflated\n", 29Compression Method: deflated
) = 29
lseek(4, 0, SEEK_SET)                   = 0
read(4, "PK\3\4\24\0\2\0\10\0\373\22694sS\214\303\363\5\0\0\r\20"..., 30) = 30
lseek(4, 10, SEEK_CUR)                  = 40
lseek(4, 0, SEEK_CUR)                   = 40
write(1, "File Contents:\n", 15File Contents:
)        = 15
read(4, "\215W\335N\33W\20\276n\244\274\303\251\257M,E\271\250Z"..., 1523) = 1523
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

Reproduce code:
---------------
<?
$file = 'index.zip';

$zip = zip_open($file);

if ($zip) {

   while ($zip_entry = zip_read($zip)) {
       echo "Name:               " . zip_entry_name($zip_entry) . "\n";
       echo "Actual Filesize:    " . zip_entry_filesize($zip_entry) . "\n";
       echo "Compressed Size:    " . zip_entry_compressedsize($zip_entry) . "\n";
       echo "Compression Method: " . zip_entry_compressionmethod($zip_entry) . "\n";

       if (zip_entry_open($zip, $zip_entry, "r")) {
           echo "File Contents:\n";
           $buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry));
           echo "$buf\n";

           zip_entry_close($zip_entry);
       }
       echo "\n";

   }

   zip_close($zip);

}
 ?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-01-25 11:17 UTC] bolk at hitv dot ru
T:\5nanz_lixil_ru\index.zip
0000000000: 50 4B 03 04 14 00 02 00 &#9474; 08 00 FB 96 39 34 73 53
0000000010: 8C C3 F3 05 00 00 0D 10 &#9474; 00 00 0A 00 00 00 69 6E
0000000020: 64 65 78 2E 68 74 6D 6C &#9474; 8D 57 DD 4E 1B 57 10 BE
0000000030: 6E A4 BC C3 A9 AF 4D 2C &#9474; 45 B9 A8 5A E3 8B E6 36
0000000040: 51 15 A9 2F 60 E3 25 38 &#9474; 05 4C ED 35 6A EE 30 24
0000000050: A1 11 49 50 DB 54 BD AA &#9474; DA 48 7D 00 63 BC F1 DA
0000000060: AC F1 2B 9C 7D 92 BE 42 &#9474; BF F9 E6 EC 9F BD 40 85
0000000070: C0 EC F1 39 73 66 BE F9 &#9474; E6 9B D9 7F AF 96 F5 1D
0000000080: 7F 6F B7 71 FF 5E 7D C7 &#9474; 6B B6 F1 F9 45 7D CF F3
0000000090: 9B 66 C7 F7 0F 36 BC 1F &#9474; 07 9D C3 CD CA E3 EE BE
00000000A0: EF ED FB 1B DF BF 3C F0 &#9474; 2A 66 4B 9F 36 2B BE F7
00000000B0: 93 5F 93 D3 DF 98 AD 9D &#9474; 66 AF EF F9 9B 03 7F 7B
00000000C0: E3 AB 8A A9 D1 8E DF F1 &#9474; 77 BD 46 BF FD C3 8B D6
00000000D0: E1 8B 9D 7E BB 75 B8 F3 &#9474; A2 55 AF E9 32 2E AC B9
00000000E0: 1B EB AD 6E FB A5 7C B6 &#9474; 3B 87 66 6B B7 D9 EF 6F
00000000F0: 56 76 BB FB CF C5 7E 85 &#9474; 9E 3D 4C 96 B7 3B BD 3E
0000000100: D6 EC 47 7B 6D 2F E2 23 &#9474; 7B 6D EC 12 FF 7E B6 23
0000000110: 7B 85 CF B1 1D C5 C7 F1 &#9474; 3B 63 17 76 64 E2 21 56
0000000120: 67 F1 B1 79 FA EC C9 23 &#9474; F3 F8 BB A7 7B 83 FD 8E
0000000130: FF F2 4B DC FB 50 AC 1E &#9474; 34 EC A7 6C 87 C9 6D 91
0000000140: A3 D7 76 6A 27 F8 7A 61 &#9474; F0 71 15 9F D3 CA 86 5D
0000000150: CA A5 F6 12 7F 47 36 C2 &#9474; 4F 18 0F E3 63 B9 F9 81
0000000160: B1 BF C1 87 11 7C C0 E5 &#9474; D8 1F BF B1 01 0E BE CB
0000000170: 19 C3 4E 2C E1 77 96 3A &#9474; 07 3F 37 0C AD 06 D8 71
0000000180: 4D 6B 62 23 64 1C F7 EF &#9474; D9 31 76 06 36 32 88 51
0000000190: CE 8E E2 0F F1 5B 1B CA &#9474; C2 98 66 23 86 BF D0 A3
00000001A0: 7A 9B 7C 71 81 DF 89 2C &#9474; 1B 22 F5 56 81 C1 9E 73
00000001B0: 63 43 5D 1B C6 27 38 39 &#9474; 49 20 93 53 8C 0E 5F 9C
00000001C0: 55 69 27 3E C7 05 80 C0 &#9474; 2E E2 33 1B 60 C9 94 C4
00000001D0: 7F A4 B8 63 57 48 47 E1 &#9474; 33 D1 C7 59 9C 9A E3 DC
 [2006-02-25 21:14 UTC] pierre dot php at gmail dot com
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PECL.


Please put this zip file somewhere online.
 [2006-02-26 03:25 UTC] bolk at hitv dot ru
What kinda information you want to get?
 [2006-02-26 08:16 UTC] pierre dot php at gmail dot com
As I said, please put this zip file somewhere online and copy the url here.
 [2006-02-27 03:10 UTC] bolk at hitv dot ru
Go to the page

http://slil.ru/22584986

and waiting while start downloading
 [2006-02-27 11:24 UTC] pierre dot php at gmail dot com
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PECL.

duplicate of #3216
 [2006-02-28 19:38 UTC] pierre dot php at gmail dot com
Thank you for your bug report. This issue has been fixed
in the latest released version of the package, which you can download at
http://pecl.php.net/get/zip


 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Dec 02 23:03:35 2021 UTC