aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--procps/kill.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/procps/kill.c b/procps/kill.c
index 39538016e..695d266c5 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);