summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2005-05-25 16:33:45 +0000
committergeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2005-05-25 16:33:45 +0000
commitea4ae84f855473023428ba091c6120b896f2a3d3 (patch)
tree51d07ed6260c871b07e15ae456cb27d9b60654f5
parent9f88e2d9fe06f567d60caf950c2206781a676b41 (diff)
BUILD : 1.7.10 (815) BUGS : 383 NOTES : Added value checking for deleting ignores, which fixes a (very rare) segfault
git-svn-id: svn://svn.anope.org/anope/trunk@815 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@568 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--Changes1
-rw-r--r--src/core/os_ignore.c3
-rw-r--r--src/process.c43
-rw-r--r--version.log6
4 files changed, 32 insertions, 21 deletions
diff --git a/Changes b/Changes
index f30d63f10..d58aea130 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,7 @@
Anope Version S V N
--------------------
Provided by Anope Dev. <dev@anope.org> - 2005
+05/25 F Segfault when clearing non-existing nick '0' from ignore list. [#383]
05/25 F Removed a double extern definition of rdb_tag_table. [#381]
05/25 F Fixed mydbgen so it sends the pass and installs in the data dir. [ #00]
05/25 F Not all nick options were displayed in listnicks. [#380]
diff --git a/src/core/os_ignore.c b/src/core/os_ignore.c
index a4d73d649..7b1ee8ff5 100644
--- a/src/core/os_ignore.c
+++ b/src/core/os_ignore.c
@@ -171,6 +171,9 @@ void delete_ignore(const char *nick)
if (stricmp(ign->who, nick) == 0)
break;
}
+ /* If the ignore was not found, bail out -GD */
+ if (!ign)
+ return;
if (prev)
prev->next = ign->next;
else
diff --git a/src/process.c b/src/process.c
index 95307c1ed..1fa7354b2 100644
--- a/src/process.c
+++ b/src/process.c
@@ -99,30 +99,33 @@ IgnoreData *get_ignore(const char *nick)
break;
}
}
- if (!finished && whichlist2) {
- for (ign = *whichlist2, prev = NULL; ign;
- prev = ign, ign = ign->next) {
- if (match_usermask(ign->who, u)) {
- finished = 1;
- break;
+ /* We can only do the next checks if we have an actual user -GD */
+ if (u) {
+ if (!finished && whichlist2) {
+ for (ign = *whichlist2, prev = NULL; ign;
+ prev = ign, ign = ign->next) {
+ if (match_usermask(ign->who, u)) {
+ finished = 1;
+ break;
+ }
}
}
- }
- if (!finished) {
- for (ign = *whichlistast, prev = NULL; ign;
- prev = ign, ign = ign->next) {
- if (match_usermask(ign->who, u)) {
- finished = 1;
- break;
+ if (!finished) {
+ for (ign = *whichlistast, prev = NULL; ign;
+ prev = ign, ign = ign->next) {
+ if (match_usermask(ign->who, u)) {
+ finished = 1;
+ break;
+ }
}
}
- }
- if (!finished) {
- for (ign = *whichlistqst, prev = NULL; ign;
- prev = ign, ign = ign->next) {
- if (match_usermask(ign->who, u)) {
- finished = 1;
- break;
+ if (!finished) {
+ for (ign = *whichlistqst, prev = NULL; ign;
+ prev = ign, ign = ign->next) {
+ if (match_usermask(ign->who, u)) {
+ finished = 1;
+ break;
+ }
}
}
}
diff --git a/version.log b/version.log
index 1b90e830c..5a2931814 100644
--- a/version.log
+++ b/version.log
@@ -8,10 +8,14 @@
VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="10"
-VERSION_BUILD="814"
+VERSION_BUILD="815"
# $Log$
#
+# BUILD : 1.7.10 (815)
+# BUGS : 383
+# NOTES : Added value checking for deleting ignores, which fixes a (very rare) segfault
+#
# BUILD : 1.7.10 (814)
# BUGS : 381
# NOTES : Removed a double extern definition of rdb_tag_table; Fixed mydbgen so it sends the pass and installs in the data dir