diff options
author | Steph Fox <sfox@php.net> | 2008-05-14 21:29:51 +0000 |
---|---|---|
committer | Steph Fox <sfox@php.net> | 2008-05-14 21:29:51 +0000 |
commit | 6a0682d986c8e7fa16b51a8c3fd8f7cc01660426 (patch) | |
tree | 3f4902979371a318d695b6a09dc003c95b6a0258 /ext/phar/func_interceptors.c | |
parent | b3b5126954689c93baddbbe48f714594bf7dac13 (diff) | |
download | php-git-6a0682d986c8e7fa16b51a8c3fd8f7cc01660426.tar.gz |
- MFH
- Make internal code forward-compatible. This included a binary cast in the default stub, hence test updates.
Diffstat (limited to 'ext/phar/func_interceptors.c')
-rw-r--r-- | ext/phar/func_interceptors.c | 8 |
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 */ |