mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-06-12 15:34:47 +02:00
Fix crash on invalid badword { } block in config file (one without type)
This commit is contained in:
@@ -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")) {
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user