summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/doio.c b/doio.c
index 7be7af1142..1e9d7d9347 100644
--- a/doio.c
+++ b/doio.c
@@ -1726,6 +1726,8 @@ nothing in the core.
* CRTL's emulation of Unix-style signals and kill()
*/
while (++mark <= sp) {
+ if (!(SvIOK(*mark) || SvNOK(*mark) || looks_like_number(*mark)))
+ Perl_croak(aTHX_ "Can't kill a non-numeric process ID");
I32 proc = SvIV(*mark);
register unsigned long int __vmssts;
APPLY_TAINT_PROPER();
@@ -1750,6 +1752,8 @@ nothing in the core.
if (val < 0) {
val = -val;
while (++mark <= sp) {
+ if (!(SvIOK(*mark) || SvNOK(*mark) || looks_like_number(*mark)))
+ Perl_croak(aTHX_ "Can't kill a non-numeric process ID");
const I32 proc = SvIV(*mark);
APPLY_TAINT_PROPER();
#ifdef HAS_KILLPG
@@ -1762,6 +1766,8 @@ nothing in the core.
}
else {
while (++mark <= sp) {
+ if (!(SvIOK(*mark) || SvNOK(*mark) || looks_like_number(*mark)))
+ Perl_croak(aTHX_ "Can't kill a non-numeric process ID");
const I32 proc = SvIV(*mark);
APPLY_TAINT_PROPER();
if (PerlProc_kill(proc, val))