1
0
mirror of https://github.com/php/php-src.git synced 2026-03-31 04:32:19 +02:00
Files
archived-php-src/ext/spl
Niels Dossche 0d4e0c013e Fix GH-14639: Member access within null pointer in ext/spl/spl_observer.c
`spl_object_storage_attach_handle` creates an entry already, but only
fills it in at the end with `spl_object_storage_create_element` which
allocates memory. In this case the allocation fails and we're left with
a NULL slot. Doing the allocation first isn't an option because we want
to check whether the slot is occupied before allocating memory.
The simplest solution is to set the entry to NULL and check for a NULL
pointer upon destruction.

Closes GH-14849.
2024-07-06 23:57:46 +02:00
..
2021-06-18 15:22:52 +01:00
2021-06-18 15:22:52 +01:00
2021-05-26 09:36:23 +02:00
2022-09-14 11:28:06 +02:00
2021-06-18 15:22:52 +01:00
2022-04-13 20:34:23 +01:00
2022-09-14 11:28:06 +02:00