diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2019-10-19 11:52:38 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2019-10-19 11:52:38 +0200 |
commit | b00cc3378c0ff3a127d1f162bd005cc33004ecb0 (patch) | |
tree | 0469751b3562dd63af72df7fe058c15ea6b6d711 /ext/com_dotnet/com_handlers.c | |
parent | 49327e2e15b131a04ca3edc1b95bb89abde58337 (diff) | |
parent | ee6a71ca7350c5c9730275a264a9c173940b071b (diff) | |
download | php-git-b00cc3378c0ff3a127d1f162bd005cc33004ecb0.tar.gz |
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix #78694: Appending to a variant array causes segfault
Diffstat (limited to 'ext/com_dotnet/com_handlers.c')
-rw-r--r-- | ext/com_dotnet/com_handlers.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/com_dotnet/com_handlers.c b/ext/com_dotnet/com_handlers.c index 1036abb977..1a5d9c3046 100644 --- a/ext/com_dotnet/com_handlers.c +++ b/ext/com_dotnet/com_handlers.c @@ -122,6 +122,11 @@ static void com_write_dimension(zend_object *object, zval *offset, zval *value) obj = (php_com_dotnet_object*) object; + if (offset == NULL) { + php_com_throw_exception(DISP_E_BADINDEX, "appending to variants is not supported"); + return; + } + if (V_VT(&obj->v) == VT_DISPATCH) { ZVAL_COPY_VALUE(&args[0], offset); ZVAL_COPY_VALUE(&args[1], value); |