summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorcertus certus@31f1291d-b8d6-0310-a050-a5561fc1590b <certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-06-06 18:16:08 +0000
committercertus certus@31f1291d-b8d6-0310-a050-a5561fc1590b <certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-06-06 18:16:08 +0000
commit1c908480b6599e4fec49eeb57d1a6e1fe2d40de0 (patch)
tree1de0ae8f46224306f360bfe963c44dbb5ee8d553 /config.c
parent019521bc0938a1b1517b01500923589a4a11e698 (diff)
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
Diffstat (limited to 'config.c')
-rw-r--r--config.c7
1 files changed, 6 insertions, 1 deletions
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--;