]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.4'
authorChristoph M. Becker <cmbecker69@gmx.de>
Sat, 19 Oct 2019 09:52:38 +0000 (11:52 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Sat, 19 Oct 2019 09:52:38 +0000 (11:52 +0200)
* PHP-7.4:
  Fix #78694: Appending to a variant array causes segfault

1  2 
ext/com_dotnet/com_handlers.c

index 1036abb977c4dbbd6e6d7c711674e1233fb63db9,fe39e2f9e049d2d61bc2b10afb8c2457cf8e0db2..1a5d9c30461b8f9e42f614c43bffdb22ebf2fa49
@@@ -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);