summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-04-20 22:50:11 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-04-20 22:50:11 -0700
commitf374360c52233c7d72ba874294a00ee18d910d08 (patch)
tree873815dc787610a29c7e028fcb6e68304efe474d /util.c
parentb14845b4fc65ba895fe9fe5f9cc346c5c235c28b (diff)
downloadperl-f374360c52233c7d72ba874294a00ee18d910d08.tar.gz
[perl #112316] Make strict vars respect null-to-null assignment
This is a follow-up to commits 6379d4a9a and 862504fb08. As Karl Williamson (thank you!) pointed out, my changes were not suf- ficient, because strEQ was still being used, which stops at the first null, treating "foo\0bar" and "foo\0foo" as equivalent. Under threads, strict vars was not respecting glob assignment from a package with a null in its name to another also with a null in its name, if the two package names shared a common prefix up to the null.
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index 716944d8f1..171456f3c2 100644
--- a/util.c
+++ b/util.c
@@ -5875,7 +5875,7 @@ Perl_stashpv_hvname_match(pTHX_ const COP *c, const HV *hv)
else
return (stashpv == name
|| (HEK_LEN(HvNAME_HEK(hv)) == len
- && strEQ(stashpv, name)));
+ && memEQ(stashpv, name, len)));
/*NOTREACHED*/
return FALSE;
}