1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-07 10:43:13 +02:00

Fix crash if configuration file contains empty set::cloak-method.

This commit is contained in:
Bram Matthys
2020-06-25 07:27:26 +02:00
parent 7901d61e92
commit b23e64cb2e
+6
View File
@@ -128,6 +128,12 @@ int cloak_config_test(ConfigFile *cf, ConfigEntry *ce, int type, int *errs)
if (!ce || !ce->ce_varname || strcmp(ce->ce_varname, "cloak-method"))
return 0;
if (!ce->ce_vardata)
{
config_error("%s:%i: set::cloak-method: no method specified. The only supported methods are: 'ip' and 'host'",
ce->ce_fileptr->cf_filename, ce->ce_varlinenum);
errors++;
} else
if (strcmp(ce->ce_vardata, "ip") && strcmp(ce->ce_vardata, "host"))
{
config_error("%s:%i: set::cloak-method: unknown method '%s'. The only supported methods are: 'ip' and 'host'",