summaryrefslogtreecommitdiff
path: root/mro.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-11-03 05:49:48 -0800
committerFather Chrysostomos <sprout@cpan.org>2013-11-04 05:10:18 -0800
commit3d8812a2a5ed72332e86e2f36bc5caa37e3e75c0 (patch)
tree246c7fe088e6cc84266e814007b89216255fe239 /mro.c
parentcec2d7b17367bf4dc1c9a283ef71c5b665952984 (diff)
downloadperl-3d8812a2a5ed72332e86e2f36bc5caa37e3e75c0.tar.gz
Check that stash entries are GVs when aliasing pkgs
$ perl5.18.1 -e '$Foo::{"Bar::"} = 0; $Bar::Bar::; *Bar:: = *Foo::' Segmentation fault: 11 That $Foo::{"Bar::"} = 0; assignment is documented as having unde- fined behaviour, but it shouldn’t crash.
Diffstat (limited to 'mro.c')
-rw-r--r--mro.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mro.c b/mro.c
index 18dfa8c011..04b3c273dc 100644
--- a/mro.c
+++ b/mro.c
@@ -1151,7 +1151,7 @@ S_mro_gather_and_rename(pTHX_ HV * const stashes, HV * const seen_stashes,
if(
(
- stashentry && *stashentry
+ stashentry && *stashentry && isGV(*stashentry)
&& (substash = GvHV(*stashentry))
)
|| (oldsubstash && HvENAME_get(oldsubstash))