From 1c908480b6599e4fec49eeb57d1a6e1fe2d40de0 Mon Sep 17 00:00:00 2001 From: "certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Sun, 6 Jun 2004 18:16:08 +0000 Subject: BUILD : 1.7.3 (171) BUGS : NOTES : Fixed big with long NSGuestNickPrefixes. We just used them in a snprintf without checking their size. Fixed a second guestnick bug as well: if compiled for hybrid guestnum was increased, tho it was never used. git-svn-id: svn://svn.anope.org/anope/trunk@171 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@119 5417fbe8-f217-4b02-8779-1006273d7864 --- config.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'config.c') diff --git a/config.c b/config.c index 27bc8068b..c52179d9c 100644 --- a/config.c +++ b/config.c @@ -1029,7 +1029,12 @@ int read_config(int reload) NSDefFlags |= NI_MEMO_RECEIVE; } - CHECK(NSGuestNickPrefix); + CHECK(NSGuestNickPrefix); /* Add safety check */ + if (NSGuestNickPrefix && (strlen(NSGuestNickPrefix) > 21)) { + error(0, "Value of NSGuestNickPrefix must be between 1 and 21"); + retval = 0; + } + CHECK(NSDefLanguage); if (NSDefLanguage) { NSDefLanguage--; -- cgit