diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2019-10-09 14:17:25 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2019-10-09 14:17:25 +0200 |
commit | 73e9acbaff0f4bcdc3ff99fb54504af2e23fec42 (patch) | |
tree | 5349ff8eb96fdf9ce644efd506c9a2d700a79914 /ext | |
parent | 9c9a833f9ca5f6d5867b2f1aab1dccbb55620191 (diff) | |
parent | 4625fa181fd5e1c9b3d8ef291c7003bf51a70512 (diff) | |
download | php-git-73e9acbaff0f4bcdc3ff99fb54504af2e23fec42.tar.gz |
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix #78650: new COM Crash
Diffstat (limited to 'ext')
-rw-r--r-- | ext/com_dotnet/com_handlers.c | 7 | ||||
-rw-r--r-- | ext/com_dotnet/tests/bug78650.phpt | 27 |
2 files changed, 33 insertions, 1 deletions
diff --git a/ext/com_dotnet/com_handlers.c b/ext/com_dotnet/com_handlers.c index c9b7d898ed..1036abb977 100644 --- a/ext/com_dotnet/com_handlers.c +++ b/ext/com_dotnet/com_handlers.c @@ -172,6 +172,11 @@ static void com_write_dimension(zend_object *object, zval *offset, zval *value) } } +static zval *com_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot) +{ + return NULL; +} + static int com_property_exists(zend_object *object, zend_string *member, int check_empty, void **cache_slot) { DISPID dispid; @@ -531,7 +536,7 @@ zend_object_handlers php_com_object_handlers = { com_property_write, com_read_dimension, com_write_dimension, - NULL, + com_get_property_ptr_ptr, com_property_exists, com_property_delete, com_dimension_exists, diff --git a/ext/com_dotnet/tests/bug78650.phpt b/ext/com_dotnet/tests/bug78650.phpt new file mode 100644 index 0000000000..c362de95bb --- /dev/null +++ b/ext/com_dotnet/tests/bug78650.phpt @@ -0,0 +1,27 @@ +--TEST-- +Bug #78650 (new COM Crash) +--SKIPIF-- +<?php +if (!extension_loaded('com_dotnet')) die('skip com_dotnet extension not available'); +?> +--FILE-- +<?php +$fname = __DIR__ . '/bug78650/foo/bar'; +mkdir($fname, 0777, true); + +$fso = new COM("Scripting.FileSystemObject"); +$folder = $fso->GetFolder($fname); +$folder->ParentFolder->Name = 'baz'; + +print('OK'); +?> +--EXPECT-- +OK +--CLEAN-- +<?php +rmdir(__DIR__ . '/bug78650/baz/bar'); +rmdir(__DIR__ . '/bug78650/foo/bar'); +rmdir(__DIR__ . '/bug78650/baz'); +rmdir(__DIR__ . '/bug78650/foo'); +rmdir(__DIR__ . '/bug78650'); +?> |