mirror of
https://github.com/php/php-src.git
synced 2026-04-07 16:13:32 +02:00
fix memleak found by valgrind
This commit is contained in:
@@ -592,7 +592,7 @@ static int phar_wrapper_stat(php_stream_wrapper *wrapper, char *url, int flags,
|
||||
if (HASH_KEY_NON_EXISTANT !=
|
||||
zend_hash_get_current_key_ex(
|
||||
&phar->manifest, &key, &keylen, &unused, 0, NULL)) {
|
||||
if (0 == memcmp(internal_file, key, internal_file_len)) {
|
||||
if (keylen >= internal_file_len && 0 == memcmp(internal_file, key, internal_file_len)) {
|
||||
/* directory found, all dirs have the same stat */
|
||||
if (key[internal_file_len] == '/') {
|
||||
phar_dostat(phar, NULL, ssb, 1, phar->alias, phar->alias_len TSRMLS_CC);
|
||||
|
||||
Reference in New Issue
Block a user