mirror of
https://github.com/sheumann/hush.git
synced 2024-12-23 05:29:58 +00:00
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>
This commit is contained in:
parent
976ec23da5
commit
9283d7c5c2
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user