This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate change #14439 from maintperl
authorChris Nandor <pudge@pobox.com>
Tue, 5 Feb 2002 02:20:45 +0000 (02:20 +0000)
committerChris Nandor <pudge@pobox.com>
Tue, 5 Feb 2002 02:20:45 +0000 (02:20 +0000)
p4raw-link: @14439 on //depot/maint-5.6/perl: 8785c8bd36d1f644f279d856312560bafd1288bf

p4raw-id: //depot/maint-5.6/macperl@14555
p4raw-integrated: from //depot/maint-5.6/perl@14399 'copy in' op.c
(@13584..)

op.c

diff --git a/op.c b/op.c
index 64414d9..8462e31 100644 (file)
--- a/op.c
+++ b/op.c
@@ -4140,7 +4140,8 @@ Perl_cv_undef(pTHX_ CV *cv)
                for (ix = AvFILLp(comppad_name); ix > 0; ix--) {
                    SV *namesv = namepad[ix];
                    if (namesv && namesv != &PL_sv_undef
-                       && *SvPVX(namesv) == '&')
+                       && *SvPVX(namesv) == '&'
+                       && ix <= AvFILLp(comppad))
                    {
                        CV *innercv = (CV*)curpad[ix];
                        if (innercv && SvTYPE(innercv) == SVt_PVCV