diff options
| author | Dmitry Stogov <dmitry@zend.com> | 2014-03-11 22:33:28 +0400 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@zend.com> | 2014-03-11 22:33:28 +0400 |
| commit | d708d3c596aa16afa9ca4906ea1fa6579b74b494 (patch) | |
| tree | ffe06f37b2893e37a996871a76f9cbd9e06a43a1 /Zend/zend_execute_API.c | |
| parent | 8863df36532530e679392da30eff72c31b0d5a9c (diff) | |
| download | php-git-d708d3c596aa16afa9ca4906ea1fa6579b74b494.tar.gz | |
Fixed passing arguments by reference from internal functions
Diffstat (limited to 'Zend/zend_execute_API.c')
| -rw-r--r-- | Zend/zend_execute_API.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 8faba97fc7..ea02c0f160 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -856,7 +856,12 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS return FAILURE; } - zval_copy_ctor(&fci->params[i]); + if (Z_REFCOUNTED(fci->params[i])) { + Z_DELREF(fci->params[i]); + } + ZVAL_DUP(&tmp, &fci->params[i]); + ZVAL_NEW_REF(&fci->params[i], &tmp); + Z_ADDREF(fci->params[i]); } else if (!Z_ISREF(fci->params[i])) { if (Z_REFCOUNTED(fci->params[i])) { Z_ADDREF(fci->params[i]); |
