Skip to content

Commit 3d4ef50

Browse files
committed
Fixed coredump due to abnormal implemention of phar
1 parent a3bd4fd commit 3d4ef50

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/phar/util.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,8 @@ phar_entry_info * phar_open_jit(phar_archive_data *phar, phar_entry_info *entry,
11871187

11881188
PHP_PHAR_API int phar_resolve_alias(char *alias, int alias_len, char **filename, int *filename_len TSRMLS_DC) /* {{{ */ {
11891189
phar_archive_data **fd_ptr;
1190-
if (SUCCESS == zend_hash_find(&(PHAR_GLOBALS->phar_alias_map), alias, alias_len, (void**)&fd_ptr)) {
1190+
if (PHAR_GLOBALS->phar_alias_map.arBuckets
1191+
&& SUCCESS == zend_hash_find(&(PHAR_GLOBALS->phar_alias_map), alias, alias_len, (void**)&fd_ptr)) {
11911192
*filename = (*fd_ptr)->fname;
11921193
*filename_len = (*fd_ptr)->fname_len;
11931194
return SUCCESS;

0 commit comments

Comments
 (0)