summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2017-12-06 18:53:16 +0000
committerZefram <zefram@fysh.org>2017-12-06 18:58:38 +0000
commit1af9149031d9f5d2d43b6df59b628a0f2c1041f6 (patch)
tree422914067fca0e9e92cdd86142cf4d17c945e642 /pp_sys.c
parentbff3de19b083d33895fc03f7d7d092e5830547a5 (diff)
downloadperl-1af9149031d9f5d2d43b6df59b628a0f2c1041f6.tar.gz
handle null op_next in stacked filetests
When a filetest op returns false, it skips past following ops that are stacked filetests. The code to do this was assuming that op_next would always be non-null, which is not always the case, for example in a sort comparator. Allow for it to be null. Fixes [perl #129347].
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 7a4c4ab1ef..b078586974 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -3116,7 +3116,7 @@ S_ft_return_false(pTHX_ SV *ret) {
PUTBACK;
if (PL_op->op_private & OPpFT_STACKING) {
- while (OP_IS_FILETEST(next->op_type)
+ while (next && OP_IS_FILETEST(next->op_type)
&& next->op_private & OPpFT_STACKED)
next = next->op_next;
}