summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordane dane@31f1291d-b8d6-0310-a050-a5561fc1590b <dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-06-05 00:36:58 +0000
committerdane dane@31f1291d-b8d6-0310-a050-a5561fc1590b <dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-06-05 00:36:58 +0000
commitf8bf964f648d2cfc212ec368ece5553b897062ab (patch)
tree4b5926ac559c5dc5ec3af8d0fbc110d94105490d
parent24810b644dc532d831a5e1f2fa8d17d4b562ce77 (diff)
BUILD : 1.7.3 (169) BUGS : 78 NOTES : Rewrite of del_exception() fixing segfault and memory leak
git-svn-id: svn://svn.anope.org/anope/trunk@169 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@117 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--Changes3
-rw-r--r--channels.c23
-rw-r--r--services.h2
-rw-r--r--version.log6
4 files changed, 22 insertions, 12 deletions
diff --git a/Changes b/Changes
index 4d8b75810..975e375cb 100644
--- a/Changes
+++ b/Changes
@@ -6,11 +6,12 @@ Provided by Anope Dev. <dev@anope.org> - 2004
05/24 A New NSNickTracking directive to provide nick tracking. [ #71]
05/21 A Auto enforce upon AKICK addition. [ #63]
05/21 A New file docs/OLDCHANGES contains all change history. [ #65]
+06/04 F Rewrite of del_exception() fixing segfault and memory leak. [ #78]
06/04 F MemoServ send limit does no longer apply for services operators. [ #84]
-05/28 F Fixed botserv bug with HAS_EXCEPTION (chmode +e). [ #80]
06/03 F Reversed pthread library detection order on ./configure script. [ #67]
06/02 F Fixed bug where people who set memoserv notify off were notified. [ #79]
05/30 F HostServ functions no longer called for non VHOST capable ircds. [ #77]
+05/28 F Fixed botserv bug with HAS_EXCEPTION (chmode +e). [ #80]
05/26 F Repaired /NS GROUP for compiled but disabled MySQL support. [ #73]
05/24 F Fixed typo in example.conf. [ #70]
05/24 F Cleaned up compile errors on older compilers. [ #69]
diff --git a/channels.c b/channels.c
index d25e662a1..2429905d6 100644
--- a/channels.c
+++ b/channels.c
@@ -1430,19 +1430,22 @@ static void del_ban(Channel * chan, char *mask)
static void del_exception(Channel * chan, char *mask)
{
- int reset = 0, i;
- for (i = 0; i <= chan->exceptcount; i++) {
- if (chan->excepts[i] == mask) {
+ int i;
+ int reset = 0;
+
+ for (i = 0; i < chan->exceptcount; i++) {
+ if ((!reset) && (strcasecmp(chan->excepts[i], mask) == 0)) {
+ free(chan->excepts[i]);
reset = 1;
}
- if (reset) {
- if (i == chan->exceptcount)
- chan->excepts[i] = NULL;
- else
- chan->excepts[i] = chan->excepts[i + 1];
- }
+ if (reset)
+ chan->excepts[i] =
+ (i == chan->exceptcount) ? NULL : chan->excepts[i + 1];
}
- chan->exceptcount--;
+
+ if (reset)
+ chan->exceptcount--;
+
if (debug)
alog("debug: Deleted except %s to channel %s", mask, chan->name);
}
diff --git a/services.h b/services.h
index 44f23a0d2..2c798722e 100644
--- a/services.h
+++ b/services.h
@@ -1016,8 +1016,10 @@ struct channel_ {
int32 bancount, bansize;
char **bans;
+#ifdef HAS_EXCEPT
int32 exceptcount, exceptsize;
char **excepts;
+#endif
struct c_userlist {
struct c_userlist *next, *prev;
diff --git a/version.log b/version.log
index 42a9a9fae..9c3cb3b3b 100644
--- a/version.log
+++ b/version.log
@@ -8,10 +8,14 @@
VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="3"
-VERSION_BUILD="167"
+VERSION_BUILD="169"
# $Log$
#
+# BUILD : 1.7.3 (169)
+# BUGS : 78
+# NOTES : Rewrite of del_exception() fixing segfault and memory leak
+#
# BUILD : 1.7.3 (167)
# BUGS :
# NOTES : Fixed a typo in my last submit, which caused a compile error.