diff options
| author | Steph Fox <sfox@php.net> | 2008-05-24 14:18:31 +0000 |
|---|---|---|
| committer | Steph Fox <sfox@php.net> | 2008-05-24 14:18:31 +0000 |
| commit | 76a9ec377b1878993daf5e116b32d256cc11f54d (patch) | |
| tree | 48a3e4b5f352c4e5356e65638eb7a0907aedc1ab /ext/phar/util.c | |
| parent | 7efb792fe829b31fd62d539b4544078f95a6b7d7 (diff) | |
| download | php-git-76a9ec377b1878993daf5e116b32d256cc11f54d.tar.gz | |
- MFB 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 | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/phar/util.c b/ext/phar/util.c index bc6ccaaa78..0099928f8b 100644 --- a/ext/phar/util.c +++ b/ext/phar/util.c @@ -1171,9 +1171,14 @@ phar_entry_info *phar_get_entry_info_dir(phar_archive_data *phar, char *path, in if (!phar->manifest.arBuckets) { 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)) { if (entry->is_deleted) { /* entry is deleted, but has not been flushed to disk yet */ |
