From: Christoph M. Becker Date: Sat, 19 Oct 2019 09:52:38 +0000 (+0200) Subject: Merge branch 'PHP-7.4' X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b00cc3378c0ff3a127d1f162bd005cc33004ecb0;p=php Merge branch 'PHP-7.4' * PHP-7.4: Fix #78694: Appending to a variant array causes segfault --- b00cc3378c0ff3a127d1f162bd005cc33004ecb0 diff --cc ext/com_dotnet/com_handlers.c index 1036abb977,fe39e2f9e0..1a5d9c3046 --- a/ext/com_dotnet/com_handlers.c +++ b/ext/com_dotnet/com_handlers.c @@@ -120,8 -122,13 +120,13 @@@ static void com_write_dimension(zend_ob VARIANT v; HRESULT res; - obj = CDNO_FETCH(object); + 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);