From faeb644b82140843ce78dabefe4fc1c36126df95 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Fri, 26 Jun 2020 07:23:12 +0200 Subject: [PATCH] Require set::who-limit to be 1 or higher. Confusion reported by armyn in https://bugs.unrealircd.org/view.php?id=5717 --- src/conf.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/conf.c b/src/conf.c index 91be88152..9db7668c6 100644 --- a/src/conf.c +++ b/src/conf.c @@ -7975,6 +7975,12 @@ int _test_set(ConfigFile *conf, ConfigEntry *ce) else if (!strcmp(cep->ce_varname, "who-limit")) { CheckNull(cep); CheckDuplicate(cep, who_limit, "who-limit"); + if (!config_checkval(cep->ce_vardata,CFG_SIZE)) + { + config_error("%s:%i: set::who-limit: value must be at least 1", + cep->ce_fileptr->cf_filename, cep->ce_varlinenum); + errors++; + } } else if (!strcmp(cep->ce_varname, "maxbans")) { CheckNull(cep);