com php-src: Fixed segfault: Zend/zend_vm_def.h Zend/ze nd_vm_execute.h
| From: | Xinchen Hui | Date: | Mon, 22 Dec 2014 04:18:56 +0000 |
| Subject: | com php-src: Fixed segfault: Zend/zend_vm_def.h Zend/ze nd_vm_execute.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-83817@lists.php.net to get a copy of this message | ||
Commit: cc4a198d1938c59f30f899d4270242c738253053
Author: Xinchen Hui <laruence@php.net> Sun, 21 Dec 2014 23:18:56 -0500
Parents: c24125e2f90e7cc88c8a2c3560bc458dbc8b704d
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=cc4a198d1938c59f30f899d4270242c738253053
Log:
Fixed segfault
Changed paths:
M Zend/zend_vm_def.h
M Zend/zend_vm_execute.h
Diff:
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
index 024dd2e..f3c0a40 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 8baec6e..797c060 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;
}