summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2017-06-13 13:40:50 +0100
committerDavid Mitchell <davem@iabyn.com>2017-06-22 13:37:51 +0100
commitb7effc98210707765c69fb0a0b9b695d5e7483ce (patch)
treee9c65cf374bf2bc118578e07a1632af654095ef3 /pp_sys.c
parent2372d0731e0bd05afe2a8f9f634ef4414110b40b (diff)
downloadperl-b7effc98210707765c69fb0a0b9b695d5e7483ce.tar.gz
pp_leavewrite: extend stack for return value
When pushing &PL_sv_yes/no on the stack, make room for it. Normally this isn't an issue as previous formlines() will have caused the stack to be extended anyway; but for the null format: format FOO = . this isn't the case.
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 74c89008fa..c6f9726079 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1554,6 +1554,8 @@ PP(pp_leavewrite)
retop = cx->blk_sub.retop;
CX_POP(cx);
+ EXTEND(SP, 1);
+
if (is_return)
/* XXX the semantics of doing 'return' in a format aren't documented.
* Currently we ignore any args to 'return' and just return