diff options
author | Greg Beaver <cellog@php.net> | 2008-05-22 06:33:09 +0000 |
---|---|---|
committer | Greg Beaver <cellog@php.net> | 2008-05-22 06:33:09 +0000 |
commit | 4b035dae5f66354928183c593facb08f98358be8 (patch) | |
tree | 1677b7ef69a306552e9fdf583b7c0771409e02b2 /ext/phar/util.c | |
parent | e1bfc452d34c703a79ad284a2786514cd1504346 (diff) | |
download | php-git-4b035dae5f66354928183c593facb08f98358be8.tar.gz |
major fixes
* found felipe's segfault in util.c and fixed the segfault (3 tests fail due to odd behavior of . and .. on this machine)
* fixed serious flaws in the setting/resetting of is_data - now it works properly. Assume
all new PharData are tar-based, and allow passing Phar::ZIP to PharData constructor to override this
* fix broken earlier commit, introduced segfault that broke 20 tests here
Diffstat (limited to 'ext/phar/util.c')
-rw-r--r-- | ext/phar/util.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/phar/util.c b/ext/phar/util.c index bc6ccaaa78..7d8ce5e0eb 100644 --- a/ext/phar/util.c +++ b/ext/phar/util.c @@ -1172,6 +1172,9 @@ phar_entry_info *phar_get_entry_info_dir(phar_archive_data *phar, char *path, in return NULL; } if (is_dir) { + if (!path_len || path_len == 1) { + return NULL; + } path_len--; } if (SUCCESS == zend_hash_find(&phar->manifest, path, path_len, (void**)&entry)) { |