summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2014-12-21 23:18:56 -0500
committerXinchen Hui <laruence@php.net>2014-12-21 23:18:56 -0500
commitcc4a198d1938c59f30f899d4270242c738253053 (patch)
tree9c79de3feddbcf39a601151d8c95775c0e0d6ebd
parentc24125e2f90e7cc88c8a2c3560bc458dbc8b704d (diff)
downloadphp-git-cc4a198d1938c59f30f899d4270242c738253053.tar.gz
Fixed segfault
-rw-r--r--Zend/zend_vm_def.h5
-rw-r--r--Zend/zend_vm_execute.h5
2 files changed, 4 insertions, 6 deletions
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
index 024dd2e7cd..f3c0a40bb8 100644
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@ -3470,12 +3470,11 @@ ZEND_VM_C_LABEL(send_array):
zend_vm_stack_extend_call_frame(&EX(call), 0, zend_hash_num_elements(ht));
if (OP1_TYPE != IS_CONST && OP1_TYPE != IS_TMP_VAR && Z_IMMUTABLE_P(args)) {
- uint32_t i;
int separate = 0;
/* check if any of arguments are going to be passed by reference */
- for (i = 0; i < zend_hash_num_elements(ht); i++) {
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, i)) {
+ for (arg_num = 0; arg_num < zend_hash_num_elements(ht); arg_num) {
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num + 1)) {
separate = 1;
break;
}
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index 8baec6e014..797c0607bd 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -883,12 +883,11 @@ send_array:
zend_vm_stack_extend_call_frame(&EX(call), 0, zend_hash_num_elements(ht));
if (opline->op1_type != IS_CONST && opline->op1_type != IS_TMP_VAR && Z_IMMUTABLE_P(args)) {
- uint32_t i;
int separate = 0;
/* check if any of arguments are going to be passed by reference */
- for (i = 0; i < zend_hash_num_elements(ht); i++) {
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, i)) {
+ for (arg_num = 0; arg_num < zend_hash_num_elements(ht); arg_num) {
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num + 1)) {
separate = 1;
break;
}