Fix memory corruption when cloning objects by disallowing clone

This commit is contained in:
Jakub Zelenka 2026-11-22 14:04:45 +01:00
commit f8ea5648b3
No known key found for this signature in database
GPG key ID: 1C0779DC5C0A9DE4
2 changed files with 2 additions and 0 deletions

View file

@ -533,6 +533,7 @@ PHP_MINIT_FUNCTION(gnupg)
memcpy(&gnupg_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
gnupg_object_handlers.offset = offsetof(gnupg_object, std);
gnupg_object_handlers.free_obj = gnupg_object_free;
gnupg_object_handlers.clone_obj = NULL;
if (SUCCESS != gnupg_keylistiterator_init(type, module_number)) {
return FAILURE;