diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2019-10-09 14:03:36 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2019-10-09 14:09:02 +0200 |
commit | 4625fa181fd5e1c9b3d8ef291c7003bf51a70512 (patch) | |
tree | 17cc82993429a5c66cdbec42acc98427df399a24 /ext/com_dotnet/com_handlers.c | |
parent | 8b5c351154284a88152ee3d166a32dc77316a658 (diff) | |
download | php-git-4625fa181fd5e1c9b3d8ef291c7003bf51a70512.tar.gz |
Fix #78650: new COM Crash
As of PHP 7.4.0, the `get_property_ptr_ptr` handler is mandatory; we
implement it to always return `NULL`, which is equivalent to not
setting the handler in former versions.
We add a portable and faster test case than what has been presented in
the bug ticket.
Diffstat (limited to 'ext/com_dotnet/com_handlers.c')
-rw-r--r-- | ext/com_dotnet/com_handlers.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/com_dotnet/com_handlers.c b/ext/com_dotnet/com_handlers.c index 0a4693fec5..8a70e60d76 100644 --- a/ext/com_dotnet/com_handlers.c +++ b/ext/com_dotnet/com_handlers.c @@ -174,6 +174,11 @@ static void com_write_dimension(zval *object, zval *offset, zval *value) } } +static zval *com_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot) +{ + return NULL; +} + #if 0 static void com_object_set(zval **property, zval *value) { @@ -546,7 +551,7 @@ zend_object_handlers php_com_object_handlers = { com_property_write, com_read_dimension, com_write_dimension, - NULL, + com_get_property_ptr_ptr, NULL, /* com_object_get, */ NULL, /* com_object_set, */ com_property_exists, |