summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes1
-rw-r--r--src/operserv.c32
-rw-r--r--version.log6
3 files changed, 22 insertions, 17 deletions
diff --git a/Changes b/Changes
index 9999fd777..c9f0c7e6a 100644
--- a/Changes
+++ b/Changes
@@ -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