summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2004-11-20 14:21:28 +0000
committerNicholas Clark <nick@ccl4.org>2004-11-20 14:21:28 +0000
commitcf28e18a35edf50bf34f08788d10c879971e9922 (patch)
tree525a774388e8164ce9bfba6f1b9577d8a5e149fc /util.c
parent7fc307b5b2c2555eb36e722b92df29f8a8d5db19 (diff)
downloadperl-cf28e18a35edf50bf34f08788d10c879971e9922.tar.gz
genuine possible buffer problems spotted by flawfinder
p4raw-id: //depot/perl@23520
Diffstat (limited to 'util.c')
-rw-r--r--util.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/util.c b/util.c
index 9a90549ae6..5a8ae3be82 100644
--- a/util.c
+++ b/util.c
@@ -2539,7 +2539,7 @@ Perl_wait4pid(pTHX_ Pid_t pid, int *statusp, int flags)
{
SV *sv;
SV** svp;
- char spid[TYPE_CHARS(int)];
+ char spid[TYPE_CHARS(IV)];
if (pid > 0) {
sprintf(spid, "%"IVdf, (IV)pid);
@@ -2555,9 +2555,6 @@ Perl_wait4pid(pTHX_ Pid_t pid, int *statusp, int flags)
hv_iterinit(PL_pidstatus);
if ((entry = hv_iternext(PL_pidstatus))) {
- SV *sv;
- char spid[TYPE_CHARS(int)];
-
pid = atoi(hv_iterkey(entry,(I32*)statusp));
sv = hv_iterval(PL_pidstatus,entry);
*statusp = SvIVX(sv);
@@ -2606,7 +2603,7 @@ void
Perl_pidgone(pTHX_ Pid_t pid, int status)
{
register SV *sv;
- char spid[TYPE_CHARS(int)];
+ char spid[TYPE_CHARS(IV)];
sprintf(spid, "%"IVdf, (IV)pid);
sv = *hv_fetch(PL_pidstatus,spid,strlen(spid),TRUE);