1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext
Christoph M. Becker 2f52dbd7b7 Prevent direct instantiation of com_safearray_proxy (GH-10278)
* Prevent direct instantiation of com_safearray_proxy

The `com_safearray_proxy` class is meant for internal usage, but so far
it was possible to instantiate it from userland, although that made no
sense.  However, a while ago there was a relevant change[1], namely
that its `default_object_handlers` are now assigned when the class is
registered, while previously they only have been assigned when an
instance had been created internally.  So now when freeing a manually
created object, `free_obj()` is called, although the object never has
been properly initialized (causing segfaults).

We fix this by introducing a `create_object()` handler which properly
initializes the object with dummy values.  Since a manually created
`com_safearray_proxy` still does not make sense, we disallow its
instantiation.

[1] <94ee4f9834>

Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
2024-10-07 11:35:59 +02:00
..
2024-09-05 02:02:36 +01:00
2024-10-06 11:02:12 +01:00
2024-10-01 13:58:40 +02:00
2024-10-03 21:12:42 +02:00
2024-09-01 13:33:53 +02:00
2024-10-05 10:21:30 +02:00
2024-09-11 20:40:01 +02:00
2024-10-06 18:02:38 +02:00
2024-10-04 20:10:04 +02:00
2024-09-13 20:02:00 +02:00
2024-09-30 20:30:03 +02:00
2024-09-26 09:39:10 +02:00
2024-09-04 01:15:10 +02:00