diff options
| author | Xinchen Hui <laruence@php.net> | 2013-11-04 14:42:54 +0800 |
|---|---|---|
| committer | Xinchen Hui <laruence@php.net> | 2013-11-04 14:42:54 +0800 |
| commit | 3d4ef50dd7e00826ae8ab9fa572908283029dbd8 (patch) | |
| tree | 32a46dd2f3f40dddc0331a5097a0b7057e9b2ba5 | |
| parent | a3bd4fda09e3385809fff6355ed12fb82b175124 (diff) | |
| download | php-git-3d4ef50dd7e00826ae8ab9fa572908283029dbd8.tar.gz | |
Fixed coredump due to abnormal implemention of phar
| -rw-r--r-- | ext/phar/util.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/phar/util.c b/ext/phar/util.c index 97b70a9d95..f2271dffd4 100644 --- a/ext/phar/util.c +++ b/ext/phar/util.c @@ -1187,7 +1187,8 @@ phar_entry_info * phar_open_jit(phar_archive_data *phar, phar_entry_info *entry, PHP_PHAR_API int phar_resolve_alias(char *alias, int alias_len, char **filename, int *filename_len TSRMLS_DC) /* {{{ */ { phar_archive_data **fd_ptr; - if (SUCCESS == zend_hash_find(&(PHAR_GLOBALS->phar_alias_map), alias, alias_len, (void**)&fd_ptr)) { + if (PHAR_GLOBALS->phar_alias_map.arBuckets + && SUCCESS == zend_hash_find(&(PHAR_GLOBALS->phar_alias_map), alias, alias_len, (void**)&fd_ptr)) { *filename = (*fd_ptr)->fname; *filename_len = (*fd_ptr)->fname_len; return SUCCESS; |
