Branch: refs/heads/blead
Home: https://github.com/Perl/perl5
Commit: f15a20bce3aaf0956e466389530be470aa2cabfe
https://github.com/Perl/perl5/commit/f15a20bce3aaf0956e466389530be470aa2cabfe
Author: Nicholas Clark <[email protected]>
Date: 2021-09-16 (Thu, 16 Sep 2021)
Changed paths:
M ext/XS-APItest/t/hash.t
M hv.c
Log Message:
-----------
Avoid a use-after-free deleting 8-bit keys from stashes
This code path only affects symbol tables, and can't be reached by regular
Perl code. It is only reachable using the XS API to delete a key from a
stash where the key was in the 8-bit range but passed in UTF-8 encoded.
This has been in the code since it was added in Oct 2010 by commit
35759254f69c7bfa:
Rename stashes when they move around
Also there is no need to call SvPV() on keysv in S_hv_delete_common() as
its caller has always already done this. This entire code is not KISS.