diff options
author | rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-11-14 08:38:34 +0000 |
---|---|---|
committer | rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-11-14 08:38:34 +0000 |
commit | e93a95d876fa598a92311bcae5fef9bff27f24cc (patch) | |
tree | 0cf5d583a38075dc29e942d46067e093d552414d | |
parent | 210a1158ea547e152f02044d90928a3e1e9805d4 (diff) |
Updated os_stats to not crash wen no nickchars are present. Im not sure this is the best fix, could GD take a look since he knows about capab? :)
git-svn-id: svn://svn.anope.org/anope/trunk@940 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@672 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | Changes | 1 | ||||
-rw-r--r-- | src/core/os_stats.c | 6 |
2 files changed, 5 insertions, 2 deletions
@@ -1,6 +1,7 @@ Anope Version S V N -------------------- Provided by Anope Dev. <dev@anope.org> - 2005 +11/14 F Added a check for nickchars before trying to use them in /os stats[ #00] 11/08 F Remove tmp modules from runtime folder when we can. [ #00] 11/02 F !protect/!deprotect no longer work for a number of ircds. [#403] 11/02 F segfault when os modloading a non-existing module. [ #00] diff --git a/src/core/os_stats.c b/src/core/os_stats.c index 030be06eb..991d0a15d 100644 --- a/src/core/os_stats.c +++ b/src/core/os_stats.c @@ -331,8 +331,10 @@ int do_stats(User * u) if (capab_info[i].flag == CAPAB_NICKCHARS) { strncat(buf, "=", buflen); buflen--; - strncat(buf, ircd->nickchars, buflen); - buflen -= strlen(ircd->nickchars); + if(ircd->nickchars) { + strncat(buf, ircd->nickchars, buflen); + buflen -= strlen(ircd->nickchars); + } /* leave blank if it was null */ } } } |