MFC: r289878
timeout(1): fix the acceptable range values for parse_signal() Before both 0 and sys_nsig would be successfully returned by parse_signal() although being invalid signal numbers. Submitted by: Alexandre Perrin <alex@kaworu.ch>
This commit is contained in:
parent
6215f7ee31
commit
6a0c65530b
@ -105,7 +105,7 @@ parse_signal(const char *str)
|
||||
int sig, i;
|
||||
const char *errstr;
|
||||
|
||||
sig = strtonum(str, 0, sys_nsig, &errstr);
|
||||
sig = strtonum(str, 1, sys_nsig - 1, &errstr);
|
||||
|
||||
if (errstr == NULL)
|
||||
return (sig);
|
||||
|
Loading…
Reference in New Issue
Block a user