1
0
Fork 0

merged [444] from trunk: fixed #55 crashes php tokenizer on certain special situation

git-svn-id: svn://svn.lighttpd.net/xcache/branches/1.2@446 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
1.2
Xuefer 15 years ago
parent daa3f82664
commit 11c56a51e1
  1. 4
      xcache.c

@ -546,6 +546,7 @@ static zend_op_array *xc_entry_install(xc_entry_t *xce, zend_file_handle *h TSRM
{
zend_uint i;
xc_entry_data_php_t *p = xce->data.php;
zend_op_array *old_active_op_array = CG(active_op_array);
#ifndef ZEND_ENGINE_2
/* new ptr which is stored inside CG(class_table) */
xc_cest_t **new_cest_ptrs = (xc_cest_t **)do_alloca(sizeof(xc_cest_t*) * p->classinfo_cnt);
@ -611,6 +612,7 @@ static zend_op_array *xc_entry_install(xc_entry_t *xce, zend_file_handle *h TSRM
#ifndef ZEND_ENGINE_2
free_alloca(new_cest_ptrs);
#endif
CG(active_op_array) = old_active_op_array;
return p->op_array;
}
/* }}} */
@ -1144,8 +1146,10 @@ err_bailout:
xc_sandbox_free(&sandbox, XC_NoInstall TSRMLS_CC);
}
else {
zend_op_array *old_active_op_array = CG(active_op_array);
CG(active_op_array) = op_array;
xc_sandbox_free(&sandbox, XC_Install TSRMLS_CC);
CG(active_op_array) = old_active_op_array;
}
ENTER_LOCK(cache) {

Loading…
Cancel
Save