summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorNiko Tyni <ntyni@debian.org>2009-01-26 14:14:36 +0200
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-02-04 14:37:44 +0100
commit1f200948c4c45a9bc088451dd377e4ab8733c722 (patch)
treea7731f2059f4ba1952fc01c1da32482a01c5c6ad /pp_sys.c
parent21afb10428b3f731e6a7c83892bed088deaea137 (diff)
downloadperl-1f200948c4c45a9bc088451dd377e4ab8733c722.tar.gz
setpgrp() should extend the stack before modifying it
As reported by Marcin Owsiany in <http://bugs.debian.org/512796>, invoking setpgrp without any arguments could corrupt the stack.
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/pp_sys.c b/pp_sys.c
index cfbf9182ea..0d2c970ff1 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -4318,6 +4318,7 @@ PP(pp_setpgrp)
if (MAXARG < 2) {
pgrp = 0;
pid = 0;
+ XPUSHi(-1);
}
else {
pgrp = POPi;