diff options
author | Pere Orga | 2011-03-07 16:22:17 +0100 |
---|---|---|
committer | Denys Vlasenko | 2011-03-07 17:00:25 +0100 |
commit | 9283d7c5c24cb5875f1115117fde2c69ff7735dc (patch) | |
tree | 5d4db85d557f4243b5e4933b64ab48d7c4de2b18 /procps/kill.c | |
parent | 976ec23da5a335572be9a6130fb4efcc08d62d0e (diff) | |
download | busybox-9283d7c5c24cb5875f1115117fde2c69ff7735dc.zip busybox-9283d7c5c24cb5875f1115117fde2c69ff7735dc.tar.gz |
kill: fix infinite loop when passed PIDs are not valid numbers
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'procps/kill.c')
-rw-r--r-- | procps/kill.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/procps/kill.c b/procps/kill.c index 3953801..695d266 100644 --- a/procps/kill.c +++ b/procps/kill.c @@ -219,6 +219,7 @@ int kill_main(int argc, char **argv) pid = bb_strtoi(arg, &end, 10); if (errno && (errno != EINVAL || *end != ' ')) { bb_error_msg("invalid number '%s'", arg); + *end = '\0'; errors++; } else if (kill(pid, signo) != 0) { bb_perror_msg("can't kill pid %d", (int)pid); |