diff options
-rw-r--r-- | src/rc/start-stop-daemon.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rc/start-stop-daemon.c b/src/rc/start-stop-daemon.c index 58bc23e3..5529e858 100644 --- a/src/rc/start-stop-daemon.c +++ b/src/rc/start-stop-daemon.c @@ -155,7 +155,8 @@ parse_signal(const char *sig) { "STOP", SIGSTOP }, { "TSTP", SIGTSTP }, { "TTIN", SIGTTIN }, - { "TTOU", SIGTTOU } + { "TTOU", SIGTTOU }, + { "NULL", 0 }, }; unsigned int i = 0; @@ -165,7 +166,7 @@ parse_signal(const char *sig) return -1; if (sscanf(sig, "%u", &i) == 1) { - if (i > 0 && i < sizeof(signallist) / sizeof(signallist[0])) + if (i >= 0 && i < NSIG) return i; eerrorx("%s: `%s' is not a valid signal", applet, sig); } |