1
0
mirror of https://github.com/php/php-src.git synced 2026-03-28 02:02:32 +01:00

- Fix possible memory corruption/memleak issue with foreach and iterators

- Fix warnings
This commit is contained in:
Marcus Boerger
2006-02-18 17:36:41 +00:00
parent bb924b320f
commit b60c8056b3

View File

@@ -388,7 +388,7 @@ static inline void zend_switch_free(zend_op *opline, temp_variable *Ts TSRMLS_DC
PZVAL_UNLOCK_FREE(T->str_offset.str);
} else {
zval_ptr_dtor(&T(opline->op1.u.var).var.ptr);
if (opline->extended_value) { /* foreach() free */
if (opline->extended_value & ZEND_FE_RESET_VARIABLE) { /* foreach() free */
zval_ptr_dtor(&T(opline->op1.u.var).var.ptr);
}
}
@@ -483,8 +483,8 @@ static inline void zend_verify_arg_type(zend_function *zf, zend_uint arg_num, zv
cur_arg_info = &zf->common.arg_info[arg_num-1];
fname = zf->common.function_name;
fsep = zf->common.scope ? "::" : EMPTY_STR;
fclass = zf->common.scope ? zf->common.scope->name : EMPTY_STR;
fsep = zf->common.scope ? "::" : (char*)EMPTY_STR;
fclass = zf->common.scope ? zf->common.scope->name : (char*)EMPTY_STR;
if (cur_arg_info->class_name) {
if (!arg) {