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")) { } else if (!strcmp(action, "drop")) {
drop = true; drop = true;
} else { } else {
for (int i = 1; i < NSIG; ++i) { for (int i = 1; i < NSIG; ++i) {
char* signal[i]; if (strcasecmp(action, sigabbrev_np(i))) continue;
if (strcasecmp(action, signal[i])) continue; signal = i;
break; break;
} }
} }
if (!drop && !fn && !signal) { if (!drop && !fn && !signal) {
syslog(LOG_NOTICE, "unknown action or signal %s", action); syslog(LOG_NOTICE, "unknown action or signal %s", action);