Skip to content

Zend: reset typed property default on every unserialize failure path. - #22481

Closed
devnexen wants to merge 1 commit into
php:masterfrom
devnexen:gh22263_follow_up
Closed

devnexen wants to merge 1 commit into
php:masterfrom
devnexen:gh22263_follow_up

Conversation

@devnexen

Copy link
Copy Markdown
Member

GH-22263 follow-up

@arnaud-lb arnaud-lb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@devnexen devnexen closed this in ab99a29 Jul 20, 2026
@devnexen
devnexen deleted the gh22263_follow_up branch August 23, 2026 14:26
nicolas-grekas added a commit to nicolas-grekas/igbinary that referenced this pull request Oct 14, 2026
Some failure paths released the partially unserialized value right away.
That ran destructors in the middle of unserialization and freed objects
still listed for a deferred __wakeup() or __unserialize() call, which
igbinary_unserialize_data_deinit() then wrote to. A truncated
__unserialize() payload was also deferred while uninitialized.

The partial value is now released once igbinary_unserialize() is done,
after objects that won't be woken up are marked as destructed, like
unserialize() does for the object that failed. Typed properties whose
value failed to unserialize are reset to their default, like
php/php-src#22481 does, and the serializer state is locked around
__wakeup().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants