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
..
tests Fix GH-14639: Member access within null pointer in ext/spl/spl_observer.c 2024-07-06 23:57:46 +02:00
config.m4 Refactor SplFixedArray (#7168) 2021-06-18 15:22:52 +01:00
config.w32 Refactor SplFixedArray (#7168) 2021-06-18 15:22:52 +01:00
CREDITS
php_spl_arginfo.h Fix rc info of iterator_to_array (#9080) 2022-07-21 15:05:34 +02:00
php_spl.c Add missing NULL checks for spl autoload table 2023-12-01 09:09:17 +01:00
php_spl.h Use ZEND_TLS for spl (#7043) 2021-05-26 09:36:23 +02:00
php_spl.stub.php Fix rc info of iterator_to_array (#9080) 2022-07-21 15:05:34 +02:00
spl_array_arginfo.h Declare ext/spl constants in stubs (#9226) 2022-08-02 16:37:12 +02:00
spl_array.c Merge branch 'PHP-8.1' into PHP-8.2 2023-08-30 22:26:36 +02:00
spl_array.h Declare ext/spl constants in stubs (#9226) 2022-08-02 16:37:12 +02:00
spl_array.stub.php Declare ext/spl constants in stubs (#9226) 2022-08-02 16:37:12 +02:00
spl_directory_arginfo.h Merge branch 'PHP-8.1' into PHP-8.2 2022-11-22 12:26:03 +00:00
spl_directory.c Fix GH-13685: Unexpected null pointer in zend_string.h 2024-03-17 18:37:52 +01:00
spl_directory.h Declare ext/spl constants in stubs (#9226) 2022-08-02 16:37:12 +02:00
spl_directory.stub.php Merge branch 'PHP-8.1' into PHP-8.2 2022-11-22 12:26:03 +00:00
spl_dllist_arginfo.h Declare ext/spl constants in stubs (#9226) 2022-08-02 16:37:12 +02:00
spl_dllist.c Revert "Fix compilation on MacOS" 2022-09-14 11:28:06 +02:00
spl_dllist.h Declare ext/spl constants in stubs (#9226) 2022-08-02 16:37:12 +02:00
spl_dllist.stub.php Declare ext/spl constants in stubs (#9226) 2022-08-02 16:37:12 +02:00
spl_engine.h Refactor SplFixedArray (#7168) 2021-06-18 15:22:52 +01:00
spl_exceptions_arginfo.h Generate ext/spl class entries from stubs 2021-02-18 13:01:51 +01:00
spl_exceptions.c Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
spl_exceptions.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
spl_exceptions.stub.php Generate ext/spl class entries from stubs 2021-02-18 13:01:51 +01:00
spl_fixedarray_arginfo.h Fix GH-9186 @strict-properties can be bypassed using unserialization (#9354) 2022-08-30 07:46:32 -04:00
spl_fixedarray.c Fix GH-13531: Unable to resize SplfixedArray after being unserialized in PHP 8.2.15 2024-02-27 23:04:23 +01:00
spl_fixedarray.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
spl_fixedarray.stub.php Fix GH-9186 @strict-properties can be bypassed using unserialization (#9354) 2022-08-30 07:46:32 -04:00
spl_functions.c SPL: minor refactoring (#8341) 2022-04-13 20:34:23 +01:00
spl_functions.h Declare ext/spl constants in stubs (#9226) 2022-08-02 16:37:12 +02:00
spl_heap_arginfo.h Declare ext/spl constants in stubs (#9226) 2022-08-02 16:37:12 +02:00
spl_heap.c Revert "Fix compilation on MacOS" 2022-09-14 11:28:06 +02:00
spl_heap.h Declare ext/spl constants in stubs (#9226) 2022-08-02 16:37:12 +02:00
spl_heap.stub.php Declare ext/spl constants in stubs (#9226) 2022-08-02 16:37:12 +02:00
spl_iterators_arginfo.h Declare ext/spl constants in stubs (#9226) 2022-08-02 16:37:12 +02:00
spl_iterators.c Fix GH-14290: Member access within null pointer in extension spl 2024-05-21 23:20:32 +02:00
spl_iterators.h Declare ext/spl constants in stubs (#9226) 2022-08-02 16:37:12 +02:00
spl_iterators.stub.php Declare ext/spl constants in stubs (#9226) 2022-08-02 16:37:12 +02:00
spl_observer_arginfo.h Declare ext/spl constants in stubs (#9226) 2022-08-02 16:37:12 +02:00
spl_observer.c Fix GH-14639: Member access within null pointer in ext/spl/spl_observer.c 2024-07-06 23:57:46 +02:00
spl_observer.h Declare ext/spl constants in stubs (#9226) 2022-08-02 16:37:12 +02:00
spl_observer.stub.php Declare ext/spl constants in stubs (#9226) 2022-08-02 16:37:12 +02:00