diff options
author | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2004-12-27 19:29:09 +0000 |
---|---|---|
committer | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2004-12-27 19:29:09 +0000 |
commit | 003f69051936795d441f7b3c86f86b778ff4e9cd (patch) | |
tree | 27d56c385b351782e9121702de116dfe75b4a689 | |
parent | d0b1978f623a3b1b9401f69142ea2e2032758c2f (diff) |
BUILD : 1.7.6 (506) BUGS : 260 NOTES : Fixed segfaults in the user-list walking with KillonSGline/KillonSQline
git-svn-id: svn://svn.anope.org/anope/trunk@506 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@360 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | Changes | 1 | ||||
-rw-r--r-- | src/operserv.c | 32 | ||||
-rw-r--r-- | version.log | 6 |
3 files changed, 22 insertions, 17 deletions
@@ -15,6 +15,7 @@ Provided by Anope Dev. <dev@anope.org> - 2004 11/19 A Added anope_cmd_ctcp() to code API, for sending CTCP messages. [ #00] 11/18 A Unable to use registered nicknames as bot nicks from now on. [ #00] 11/18 A NSAddAccessOnReg to control access list on registration. [ #00] +12/27 F Segfaults with enforcing KillonSGline/KillonSQline. [#260] 12/26 F Updated IRCD doc to show all the flags currently in the code. [ #00] 12/26 F Fixed segfault with some config options if they are set wrong. [ #00] 12/26 F Updated PTLink support to be more in line with the ircd protocol. [ #00] diff --git a/src/operserv.c b/src/operserv.c index ab0e90ea9..ab68d0409 100644 --- a/src/operserv.c +++ b/src/operserv.c @@ -2521,7 +2521,7 @@ int add_sgline(User * u, char *mask, const char *by, const time_t expires, int deleted = 0, i; int x; SXLine *entry; - User *u2; + User *u2, *next; char buf[BUFSIZE]; *buf = '\0'; @@ -2600,14 +2600,14 @@ int add_sgline(User * u, char *mask, const char *by, const time_t expires, anope_cmd_sgline(entry->mask, entry->reason); if (KillonSGline && !ircd->sglineenforce) { - for (x = 0; x < 1024; x++) { - for (u2 = userlist[x]; u2; u2 = u2->next) { - if (match_wild_nocase(entry->mask, u2->realname)) { - snprintf(buf, BUFSIZE - 1, "G-Lined: %s", - entry->reason); - kill_user(ServerName, u2->nick, buf); - } + u2 = firstuser(); + while (u2) { + next = nextuser(); + if (match_wild_nocase(entry->mask, u2->realname)) { + snprintf(buf, (BUFSIZE - 1), "G-Lined: %s", entry->reason); + kill_user(ServerName, u2->nick, buf); } + u2 = next; } } return deleted; @@ -2988,7 +2988,7 @@ int add_sqline(User * u, char *mask, const char *by, const time_t expires, { int deleted = 0, i; int x; - User *u2; + User *u2, *next; SXLine *entry; char buf[BUFSIZE]; *buf = '\0'; @@ -3072,14 +3072,14 @@ int add_sqline(User * u, char *mask, const char *by, const time_t expires, sqline(entry->mask, entry->reason); if (KillonSQline) { - for (x = 0; x < 1024; x++) { - for (u2 = userlist[x]; u2; u2 = u2->next) { - if (match_wild_nocase(entry->mask, u2->nick)) { - snprintf(buf, BUFSIZE - 1, "Q-Lined: %s", - entry->reason); - kill_user(ServerName, u2->nick, buf); - } + u2 = firstuser(); + while (u2) { + next = nextuser(); + if (match_wild_nocase(entry->mask, u2->nick)) { + snprintf(buf, (BUFSIZE - 1), "Q-Lined: %s", entry->reason); + kill_user(ServerName, u2->nick, buf); } + u2 = next; } } diff --git a/version.log b/version.log index c2532721e..cc2efe531 100644 --- a/version.log +++ b/version.log @@ -8,10 +8,14 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="6" -VERSION_BUILD="505" +VERSION_BUILD="506" # $Log$ # +# BUILD : 1.7.6 (506) +# BUGS : 260 +# NOTES : Fixed segfaults in the user-list walking with KillonSGline/KillonSQline +# # BUILD : 1.7.6 (505) # BUGS : N/A # NOTES : Some documentation updated, fixed compiler errors with ptlink, and fixed a segfault with some options when |