From 23e6d4ed731e8ababa1e6261346610e30e82b0ba Mon Sep 17 00:00:00 2001 From: ManiacTwister Date: Mon, 26 Nov 2018 20:12:04 +0100 Subject: [PATCH] Check if users_max is less than users_min --- src/newconf.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/newconf.c b/src/newconf.c index c048bcbd..22a98887 100644 --- a/src/newconf.c +++ b/src/newconf.c @@ -1829,6 +1829,17 @@ conf_end_fakechannel(struct TopConf *tc) { conf_report_error("Ignoring fakechannel -- must have a name."); + rb_free(yy_fakechannel->topic); + rb_free(yy_fakechannel); + + return -1; + } + + if (yy_fakechannel->users_max < yy_fakechannel->users_min) + { + conf_report_error("Ignoring fakechannel -- users_max less than users_min."); + + rb_free(yy_fakechannel->topic); rb_free(yy_fakechannel); return -1;