From 3e31838d19750d287431d22e9290856ec962fd6a Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 22 Jan 2015 11:50:42 +0300 Subject: zend_read_property() has to provide a holder for return value. Previously it was possible that zend_read_property() returned pointer to zval allocated on stack. --- sapi/cli/php_cli.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sapi/cli/php_cli.c') diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 07d7825dc7..ca0ea57fa7 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -1107,10 +1107,10 @@ static int do_cli(int argc, char **argv) /* {{{ */ zend_call_method_with_1_params(&ref, pce, &pce->constructor, "__construct", NULL, &arg); if (EG(exception)) { - zval tmp, *msg; + zval tmp, *msg, rv; ZVAL_OBJ(&tmp, EG(exception)); - msg = zend_read_property(zend_exception_get_default(), &tmp, "message", sizeof("message")-1, 0); + msg = zend_read_property(zend_exception_get_default(), &tmp, "message", sizeof("message")-1, 0, &rv); zend_printf("Exception: %s\n", Z_STRVAL_P(msg)); zval_ptr_dtor(&tmp); EG(exception) = NULL; -- cgit v1.2.1