diff options
author | Hugo van der Sanden <hv@crypt.org> | 2016-05-15 13:48:58 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2016-05-15 14:01:29 -0700 |
commit | 60a26c797bbff039ea7f861903732e7cceae415a (patch) | |
tree | b586fd0b92cc555af544eb2b1f7fa56f1c99d38a /hv.c | |
parent | 59a14f30f688ba05fd58f9dba1521fb9be116403 (diff) | |
download | perl-60a26c797bbff039ea7f861903732e7cceae415a.tar.gz |
[perl #128086] Fix precedence in hv_ename_delete
A stash’s array of names may have null for the first entry, in which
case it is not one of the effective names, and the name count will
be negative.
The ‘count > 0’ is meant to prevent hv_ename_delete from trying to
read that entry, but a precedence problem introduced in 4643eb699
stopped it from doing that.
[This commit message was written by the committer.]
Diffstat (limited to 'hv.c')
-rw-r--r-- | hv.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2476,9 +2476,10 @@ Perl_hv_ename_delete(pTHX_ HV *hv, const char *name, U32 len, U32 flags) return; } if ( - count > 0 && (HEK_UTF8(*namep) || (flags & SVf_UTF8)) + count > 0 && ((HEK_UTF8(*namep) || (flags & SVf_UTF8)) ? hek_eq_pvn_flags(aTHX_ *namep, name, (I32)len, flags) : (HEK_LEN(*namep) == (I32)len && memEQ(HEK_KEY(*namep), name, len)) + ) ) { aux->xhv_name_count = -count; } |