mirror of
https://github.com/php/php-src.git
synced 2026-04-18 21:41:22 +02:00
Merge branch 'PHP-5.6'
* PHP-5.6: NEWS save a few memory Fixed Bug #66321 (ZipArchive::open() ze_obj->filename_len not real)
This commit is contained in:
@@ -1514,7 +1514,7 @@ static ZIPARCHIVE_METHOD(open)
|
||||
int filename_len;
|
||||
int err = 0;
|
||||
long flags = 0;
|
||||
char resolved_path[MAXPATHLEN];
|
||||
char *resolved_path;
|
||||
|
||||
zval *this = getThis();
|
||||
ze_zip_object *ze_obj = NULL;
|
||||
@@ -1537,7 +1537,7 @@ static ZIPARCHIVE_METHOD(open)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (!expand_filepath(filename, resolved_path TSRMLS_CC)) {
|
||||
if (!(resolved_path = expand_filepath(filename, NULL TSRMLS_CC))) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -1558,8 +1558,8 @@ static ZIPARCHIVE_METHOD(open)
|
||||
if (!intern || err) {
|
||||
RETURN_LONG((long)err);
|
||||
}
|
||||
ze_obj->filename = estrdup(resolved_path);
|
||||
ze_obj->filename_len = filename_len;
|
||||
ze_obj->filename = resolved_path;
|
||||
ze_obj->filename_len = strlen(resolved_path);
|
||||
ze_obj->za = intern;
|
||||
RETURN_TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user