Fix segfault on signal

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
Georg Pfuetzenreuter 2022-04-22 02:50:25 +00:00
parent 94b3b79c56
commit 01e774c619
Signed by: Georg
GPG Key ID: 1ED2F138E7E6FF57

View File

@ -159,11 +159,11 @@ static void parseControl(char *command) {
} else if (!strcmp(action, "drop")) {
drop = true;
} else {
for (int i = 1; i < NSIG; ++i) {
char* signal[i];
if (strcasecmp(action, signal[i])) continue;
break;
}
for (int i = 1; i < NSIG; ++i) {
if (strcasecmp(action, sigabbrev_np(i))) continue;
signal = i;
break;
}
}
if (!drop && !fn && !signal) {
syslog(LOG_NOTICE, "unknown action or signal %s", action);