[php-src] PR #25488: Fix GH-25487: sodium_memzero() sets a typed property to null without TypeError
| From: | lazerg | Date: | Mon, 16 Nov 2026 14:24:10 +0000 |
| Subject: | [php-src] PR #25488: Fix GH-25487: sodium_memzero() sets a typed property to null without TypeError | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-40688@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/25488
Author: lazerg
sodium_memzero() cleared its argument with convert_to_null() on the
dereferenced value, so the type of a typed property holding the reference was never checked and a
string property ended up as null. It now assigns null through the reference with
ZEND_TRY_ASSIGN_REF_NULL(), so that case throws a TypeError like settype()
does. sodium_crypto_generichash_final() had the same problem with its
$state argument and gets the same fix.
Fixes #25487