projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5170759
)
Restore null checks to stashpv_hvname_match [perl #101430]
author
Father Chrysostomos
<sprout@cpan.org>
Sun, 16 Oct 2011 20:18:46 +0000
(13:18 -0700)
committer
Father Chrysostomos
<sprout@cpan.org>
Sun, 16 Oct 2011 20:19:05 +0000
(13:19 -0700)
Commit
aa33328e8
inadvertently removed the null checks from
stashpv_hvname_match when adding UTF8 support, resulting in crashes it
List::Gen’s test suite.
util.c
patch
|
blob
|
history
diff --git
a/util.c
b/util.c
index
7583d23
..
1df5453
100644
(file)
--- a/
util.c
+++ b/
util.c
@@
-5837,6
+5837,8
@@
Perl_stashpv_hvname_match(pTHX_ const COP *c, const HV *hv)
PERL_UNUSED_CONTEXT;
PERL_ARGS_ASSERT_STASHPV_HVNAME_MATCH;
+ if (!stashpv || !name)
+ return stashpv == name;
if ( HvNAMEUTF8(hv) && !(CopSTASH_flags(c) & SVf_UTF8 ? 1 : 0) ) {
if (CopSTASH_flags(c) & SVf_UTF8) {
return (bytes_cmp_utf8(