summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-05-31 19:54:31 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-05-31 19:54:31 +0000
commitb862623f640d051afa35dfa66f03e9a997880b50 (patch)
tree07f55b52d4deb3f95b42b288e7d3f80d3db2c10f /gv.c
parent056a8fbecb5430f5c3c47e7377e5467379e227be (diff)
downloadperl-b862623f640d051afa35dfa66f03e9a997880b50.tar.gz
Fix a case of segfault in gv_check(), by making
it ignore non-GV values in stashes. p4raw-id: //depot/perl@19652
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gv.c b/gv.c
index 95d4d36c67..41feaa20d4 100644
--- a/gv.c
+++ b/gv.c
@@ -1156,7 +1156,7 @@ Perl_gv_check(pTHX_ HV *stash)
for (i = 0; i <= (I32) HvMAX(stash); i++) {
for (entry = HvARRAY(stash)[i]; entry; entry = HeNEXT(entry)) {
if (HeKEY(entry)[HeKLEN(entry)-1] == ':' &&
- (gv = (GV*)HeVAL(entry)) && (hv = GvHV(gv)))
+ (gv = (GV*)HeVAL(entry)) && isGV(gv) && (hv = GvHV(gv)))
{
if (hv != PL_defstash && hv != stash)
gv_check(hv); /* nested package */