1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-12 17:14:46 +02:00

Fix crash on invalid badword { } block in config file (one without type)

This commit is contained in:
Bram Matthys
2023-06-27 18:31:25 +02:00
parent 89f9659158
commit 0cc800e736
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -95,7 +95,8 @@ int censor_config_test(ConfigFile *cf, ConfigEntry *ce, int type, int *errs)
{
config_error("%s:%i: badword without type",
ce->file->filename, ce->line_number);
return 1;
*errs = 1;
return -1;
}
else if (strcmp(ce->value, "channel") &&
strcmp(ce->value, "quit") && strcmp(ce->value, "all")) {
+2 -1
View File
@@ -86,7 +86,8 @@ int censor_config_test(ConfigFile *cf, ConfigEntry *ce, int type, int *errs)
{
config_error("%s:%i: badword without type",
ce->file->filename, ce->line_number);
return 1;
*errs = 1;
return -1;
}
else if (strcmp(ce->value, "message") && strcmp(ce->value, "all")) {
/* config_error("%s:%i: badword with unknown type",