com php-src: Fixed Conditional jump or move depends on uninitialised value(s): Zend/zend_compile.c
| From: | Xinchen Hui | Date: | Thu, 18 Jun 2015 11:56:50 +0000 |
| Subject: | com php-src: Fixed Conditional jump or move depends on uninitialised value(s): Zend/zend_compile.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-87360@lists.php.net to get a copy of this message | ||
Commit: 509d75527afc2179e7fef478d6a60b8fbb567dd5
Author: Xinchen Hui <laruence@php.net> Thu, 18 Jun 2015 19:56:08 +0800
Parents: c58c5e779a3ef32e8cf4c18890982403210abff3
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=509d75527afc2179e7fef478d6a60b8fbb567dd5
Log:
Fixed Conditional jump or move depends on uninitialised value(s)
reproduced by Bug #69868's test script
Bugs:
https://bugs.php.net/69868
Changed paths:
M Zend/zend_compile.c
Diff:
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index b5becb8..0baf735 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -4406,7 +4406,13 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast) /* {{{ */
opline->op2.num = -1;
}
}
- }
+ } else {
+ if (opline->opcode == ZEND_RECV_INIT) {
+ Z_CACHE_SLOT(op_array->literals[opline->op2.constant]) = -1;
+ } else {
+ opline->op2.num = -1;
+ }
+ }
}
/* These are assigned at the end to avoid unitialized memory in case of an error */