From 629d0d59f707f2a4ec8a940d22b3e0f11f45d080 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Sat, 5 Apr 2003 21:16:21 +0000 Subject: [PATCH] - Fixed a set::modes-on-join bug and fixed an oob read in config parser. (1st=someone forgot a bzero) --- Changes | 1 + src/s_conf.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index ac61d6cf2..3875d3418 100644 --- a/Changes +++ b/Changes @@ -2006,3 +2006,4 @@ seen. gmtime warning still there by |VIO|Maverick and Rocko - Made throttling use DelListItem and fixed some confusing regarding undeffing of THROTTLING +- Fixed a set::modes-on-join bug and fixed an oob read in config parser. diff --git a/src/s_conf.c b/src/s_conf.c index 40659b0db..18068c9fc 100644 --- a/src/s_conf.c +++ b/src/s_conf.c @@ -930,7 +930,7 @@ static ConfigFile *config_parse(char *filename, char *confdata) start = ptr; for(;*ptr;ptr++) { - if ((*ptr == ' ') || (*ptr == '=') || (*ptr == '\t') || (*ptr == '\n') || (*ptr == ';')) + if ((*ptr == ' ') || (*ptr == '=') || (*ptr == '\t') || (*ptr == '\n') || (*ptr == ';') || (*ptr == '\0')) break; } if (!*ptr) @@ -5194,6 +5194,7 @@ int _test_set(ConfigFile *conf, ConfigEntry *ce) else if (!strcmp(cep->ce_varname, "modes-on-join")) { char *c; struct ChMode temp; + bzero(&temp, sizeof(temp)); CheckNull(cep); for (c = cep->ce_vardata; *c; c++) {