summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-08-31 14:14:21 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-08-31 14:14:21 +0000
commitea1d064a0a997a28f8265a165120fea0d04e9a22 (patch)
treefafa1eb00bf4de63a28686e2ff6eed96c3848559 /op.c
parentd9baf692ef7bf68c5e130e004b7c236d80e73edd (diff)
downloadperl-ea1d064a0a997a28f8265a165120fea0d04e9a22.tar.gz
Fix for [perl #37036] perl segfault at 'compile'-time
p4raw-id: //depot/perl@25341
Diffstat (limited to 'op.c')
-rw-r--r--op.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/op.c b/op.c
index 4e21c7f336..c0cca4e7b7 100644
--- a/op.c
+++ b/op.c
@@ -5896,6 +5896,7 @@ Perl_ck_open(pTHX_ OP *o)
(last->op_private & OPpCONST_STRICT) &&
(oa = first->op_sibling) && /* The fh. */
(oa = oa->op_sibling) && /* The mode. */
+ (oa->op_type == OP_CONST) &&
SvPOK(((SVOP*)oa)->op_sv) &&
(mode = SvPVX_const(((SVOP*)oa)->op_sv)) &&
mode[0] == '>' && mode[1] == '&' && /* A dup open. */