projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
976ec23
)
kill: fix infinite loop when passed PIDs are not valid numbers
author
Pere Orga
<gotrunks@gmail.com>
Mon, 7 Mar 2011 15:22:17 +0000
(16:22 +0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Mon, 7 Mar 2011 16:00:25 +0000
(17:00 +0100)
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
procps/kill.c
patch
|
blob
|
history
diff --git
a/procps/kill.c
b/procps/kill.c
index 39538016ecd0ba1836b98789e66278a3cd928cea..695d266c57e1612b89e5d5b5f8ae623fecdbe901 100644
(file)
--- 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);