summaryrefslogtreecommitdiff
path: root/ext/phar/func_interceptors.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/phar/func_interceptors.c')
-rw-r--r--ext/phar/func_interceptors.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/phar/func_interceptors.c b/ext/phar/func_interceptors.c
index b92d61a422..853cf1477d 100644
--- a/ext/phar/func_interceptors.c
+++ b/ext/phar/func_interceptors.c
@@ -655,7 +655,8 @@ notfound:
goto stat_entry;
} else {
phar_archive_data *phar = *pphar;
- char *key;
+ phar_zstr key;
+ char *str_key;
uint keylen;
ulong unused;
@@ -667,11 +668,12 @@ notfound:
if (HASH_KEY_NON_EXISTANT !=
zend_hash_get_current_key_ex(
&phar->manifest, &key, &keylen, &unused, 0, NULL)) {
- if (!memcmp(actual, key, actual_len)) {
+ PHAR_STR(key, str_key);
+ if (!memcmp(actual, str_key, actual_len)) {
efree(save2);
efree(entry);
/* directory found, all dirs have the same stat */
- if (key[actual_len] == '/') {
+ if (str_key[actual_len] == '/') {
sb.st_size = 0;
sb.st_mode = 0777;
sb.st_mode |= S_IFDIR; /* regular directory */