diff options
| author | Greg Beaver <cellog@php.net> | 2008-05-30 22:49:33 +0000 |
|---|---|---|
| committer | Greg Beaver <cellog@php.net> | 2008-05-30 22:49:33 +0000 |
| commit | 83e491b2c3b1527a2989fb46d7af8531240666a2 (patch) | |
| tree | 7bb4e05ab754af8fc786155db31f175af1e5173e | |
| parent | 8b600a72dc3ab4f4cbb1e583154732a34743ea28 (diff) | |
| download | php-git-83e491b2c3b1527a2989fb46d7af8531240666a2.tar.gz | |
fix corrupted zips, fix postprocess for compressed zip file
| -rw-r--r-- | ext/phar/phar.c | 2 | ||||
| -rw-r--r-- | ext/phar/tests/zip/files/frontcontroller.phar.zip | bin | 625 -> 804 bytes | |||
| -rw-r--r-- | ext/phar/tests/zip/files/frontcontroller10.phar.zip | bin | 471 -> 796 bytes | |||
| -rw-r--r-- | ext/phar/tests/zip/files/frontcontroller11.phar.zip | bin | 461 -> 783 bytes | |||
| -rw-r--r-- | ext/phar/tests/zip/files/frontcontroller12.phar.zip | bin | 465 -> 786 bytes | |||
| -rw-r--r-- | ext/phar/tests/zip/files/frontcontroller2.phar.zip | bin | 531 -> 677 bytes | |||
| -rw-r--r-- | ext/phar/tests/zip/files/frontcontroller3.phar.zip | bin | 826 -> 816 bytes | |||
| -rw-r--r-- | ext/phar/tests/zip/files/frontcontroller4.phar.zip | bin | 822 -> 812 bytes | |||
| -rw-r--r-- | ext/phar/tests/zip/files/frontcontroller5.phar.zip | bin | 554 -> 707 bytes | |||
| -rw-r--r-- | ext/phar/tests/zip/files/frontcontroller6.phar.zip | bin | 559 -> 709 bytes | |||
| -rw-r--r-- | ext/phar/tests/zip/files/frontcontroller7.phar.zip | bin | 559 -> 710 bytes | |||
| -rw-r--r-- | ext/phar/tests/zip/files/frontcontroller8.phar.zip | bin | 684 -> 896 bytes | |||
| -rw-r--r-- | ext/phar/tests/zip/files/frontcontroller9.phar.zip | bin | 697 -> 923 bytes |
13 files changed, 1 insertions, 1 deletions
diff --git a/ext/phar/phar.c b/ext/phar/phar.c index 93a8cbb582..27afc67dc7 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -1988,7 +1988,7 @@ int phar_postprocess_file(php_stream_wrapper *wrapper, int options, phar_entry_d /* construct actual offset to file start - local extra_len can be different from central extra_len */ entry->offset = entry->offset_abs = sizeof(local) + entry->header_offset + PHAR_ZIP_16(local.filename_len) + PHAR_ZIP_16(local.extra_len); - if (idata->zero != entry->offset_abs) { + if (idata->zero && idata->zero != entry->offset_abs) { idata->zero = entry->offset_abs; } } diff --git a/ext/phar/tests/zip/files/frontcontroller.phar.zip b/ext/phar/tests/zip/files/frontcontroller.phar.zip Binary files differindex 4ee905dd3a..28992ff6f9 100644 --- a/ext/phar/tests/zip/files/frontcontroller.phar.zip +++ b/ext/phar/tests/zip/files/frontcontroller.phar.zip diff --git a/ext/phar/tests/zip/files/frontcontroller10.phar.zip b/ext/phar/tests/zip/files/frontcontroller10.phar.zip Binary files differindex c37cb381fb..d206c89255 100644 --- a/ext/phar/tests/zip/files/frontcontroller10.phar.zip +++ b/ext/phar/tests/zip/files/frontcontroller10.phar.zip diff --git a/ext/phar/tests/zip/files/frontcontroller11.phar.zip b/ext/phar/tests/zip/files/frontcontroller11.phar.zip Binary files differindex 48e5fc678a..994218364d 100644 --- a/ext/phar/tests/zip/files/frontcontroller11.phar.zip +++ b/ext/phar/tests/zip/files/frontcontroller11.phar.zip diff --git a/ext/phar/tests/zip/files/frontcontroller12.phar.zip b/ext/phar/tests/zip/files/frontcontroller12.phar.zip Binary files differindex c086c4d4a4..e831e44302 100644 --- a/ext/phar/tests/zip/files/frontcontroller12.phar.zip +++ b/ext/phar/tests/zip/files/frontcontroller12.phar.zip diff --git a/ext/phar/tests/zip/files/frontcontroller2.phar.zip b/ext/phar/tests/zip/files/frontcontroller2.phar.zip Binary files differindex 7ef43dc000..3d7c0bbb1b 100644 --- a/ext/phar/tests/zip/files/frontcontroller2.phar.zip +++ b/ext/phar/tests/zip/files/frontcontroller2.phar.zip diff --git a/ext/phar/tests/zip/files/frontcontroller3.phar.zip b/ext/phar/tests/zip/files/frontcontroller3.phar.zip Binary files differindex 40c1d4994b..f167f2f6ef 100644 --- a/ext/phar/tests/zip/files/frontcontroller3.phar.zip +++ b/ext/phar/tests/zip/files/frontcontroller3.phar.zip diff --git a/ext/phar/tests/zip/files/frontcontroller4.phar.zip b/ext/phar/tests/zip/files/frontcontroller4.phar.zip Binary files differindex 4dc83408b0..1ad83f8a65 100644 --- a/ext/phar/tests/zip/files/frontcontroller4.phar.zip +++ b/ext/phar/tests/zip/files/frontcontroller4.phar.zip diff --git a/ext/phar/tests/zip/files/frontcontroller5.phar.zip b/ext/phar/tests/zip/files/frontcontroller5.phar.zip Binary files differindex 0ab0472101..7fa7ab61b7 100644 --- a/ext/phar/tests/zip/files/frontcontroller5.phar.zip +++ b/ext/phar/tests/zip/files/frontcontroller5.phar.zip diff --git a/ext/phar/tests/zip/files/frontcontroller6.phar.zip b/ext/phar/tests/zip/files/frontcontroller6.phar.zip Binary files differindex bf98255fe9..cb06618b7a 100644 --- a/ext/phar/tests/zip/files/frontcontroller6.phar.zip +++ b/ext/phar/tests/zip/files/frontcontroller6.phar.zip diff --git a/ext/phar/tests/zip/files/frontcontroller7.phar.zip b/ext/phar/tests/zip/files/frontcontroller7.phar.zip Binary files differindex 02fc3e27b6..0e97f27b00 100644 --- a/ext/phar/tests/zip/files/frontcontroller7.phar.zip +++ b/ext/phar/tests/zip/files/frontcontroller7.phar.zip diff --git a/ext/phar/tests/zip/files/frontcontroller8.phar.zip b/ext/phar/tests/zip/files/frontcontroller8.phar.zip Binary files differindex 41952ce745..d065cd5e58 100644 --- a/ext/phar/tests/zip/files/frontcontroller8.phar.zip +++ b/ext/phar/tests/zip/files/frontcontroller8.phar.zip diff --git a/ext/phar/tests/zip/files/frontcontroller9.phar.zip b/ext/phar/tests/zip/files/frontcontroller9.phar.zip Binary files differindex d3f4ff8404..82c4eb7024 100644 --- a/ext/phar/tests/zip/files/frontcontroller9.phar.zip +++ b/ext/phar/tests/zip/files/frontcontroller9.phar.zip |
