summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-03-23 00:48:23 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-03-23 00:48:23 +0000
commit8a996ce8d00364c0bbcf12b34586652aab085a22 (patch)
treeb78f7a328b215b31fc2cb1d7f143d770a80911bf /op.c
parent1e9d704ef88f6d8dc4307ef76fd03a5ad9861b1f (diff)
downloadperl-8a996ce8d00364c0bbcf12b34586652aab085a22.tar.gz
Purify: Array bounds read: o->op_last was accessed
for unops (via newUNOP() and ck_eof()). (analysis okay, patch bad: see #15439) p4raw-id: //depot/perl@15434
Diffstat (limited to 'op.c')
-rw-r--r--op.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/op.c b/op.c
index c755d1142e..1c88bba492 100644
--- a/op.c
+++ b/op.c
@@ -5971,7 +5971,8 @@ Perl_ck_fun(pTHX_ OP *o)
OP *newop = newGVOP(OP_GV, 0,
gv_fetchpv(SvPVx(((SVOP*)kid)->op_sv, n_a), TRUE,
SVt_PVIO) );
- if (kid == cLISTOPo->op_last)
+ if ((o->op_flags & OPf_KIDS) &&
+ kid == cLISTOPo->op_last)
cLISTOPo->op_last = newop;
op_free(kid);
kid = newop;