]> granicus.if.org Git - php/commitdiff
Fixed Conditional jump or move depends on uninitialised value(s)
authorXinchen Hui <laruence@php.net>
Thu, 18 Jun 2015 11:56:08 +0000 (19:56 +0800)
committerXinchen Hui <laruence@php.net>
Thu, 18 Jun 2015 11:56:50 +0000 (19:56 +0800)
reproduced by Bug #69868's test script

Zend/zend_compile.c

index b5becb88e0ff84b8346c7efa6391b416b4f5c14f..0baf735bdac28bfa6550b11bc8a7291b9c7cf3d6 100644 (file)
@@ -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 */