com php-src: Fixed coredump due to abnormal implemention of phar: ext/phar/util.c

From: Date: Mon, 04 Nov 2013 06:42:54 +0000
Subject: com php-src: Fixed coredump due to abnormal implemention of phar: ext/phar/util.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-73845@lists.php.net to get a copy of this message
Commit: 3d4ef50dd7e00826ae8ab9fa572908283029dbd8 Author: Xinchen Hui <laruence@php.net> Mon, 4 Nov 2013 14:42:54 +0800 Parents: a3bd4fda09e3385809fff6355ed12fb82b175124 Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3d4ef50dd7e00826ae8ab9fa572908283029dbd8 Log: Fixed coredump due to abnormal implemention of phar Changed paths: M ext/phar/util.c Diff: diff --git a/ext/phar/util.c b/ext/phar/util.c index 97b70a9..f2271df 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;

« previous php.cvs (#73845) next »