summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-02-26 13:43:13 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-02-26 13:43:13 +0000
commitb00cf838bb11fdff8a55c67f07e1045350ec8981 (patch)
treee60b876cbf3684ac40536d87a8bcf401e50e17eb
parent1a4ea8dc01a946ad48a0e85808d3e09d047c98d3 (diff)
downloadrsyslog-b00cf838bb11fdff8a55c67f07e1045350ec8981.tar.gz
rsyslog-b00cf838bb11fdff8a55c67f07e1045350ec8981.tar.xz
rsyslog-b00cf838bb11fdff8a55c67f07e1045350ec8981.zip
- bugfix: resolved potential segfault condition on HUP (extremely unlikely
to happen in practice), for details see tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=38
-rw-r--r--ChangeLog3
-rw-r--r--modules.c12
2 files changed, 15 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index ce61ea82..1caea15b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
Version 2.0.3 STABLE (rgerhards), 2008-02-??
- bugfix: setting for $EscapeCopntrolCharactersOnReceive was not
properly initialized
+- bugfix: resolved potential segfault condition on HUP (extremely
+ unlikely to happen in practice), for details see tracker:
+ http://bugzilla.adiscon.com/show_bug.cgi?id=38
- improved the man pages a bit - thanks to Michael Biebl for the patch
---------------------------------------------------------------------------
Version 2.0.2 STABLE (rgerhards), 2008-02-12
diff --git a/modules.c b/modules.c
index f04c4a97..406cf32a 100644
--- a/modules.c
+++ b/modules.c
@@ -378,6 +378,18 @@ rsRetVal modUnloadAndDestructDynamic(void)
}
}
+ /* Note: the last modules pNext pointer is now invalid
+ * (except if the last module was not touched, what is highly
+ * unlikely. We simply fix this be setting it to NULL. After all,
+ * it is the last module ;). This bug had some severe effects in
+ * v3, but none in v2 because in v2 the list was never again
+ * traversed before a new one was added. But even in v2 it may cause
+ * a segfault if the number of loaded modules changed between HUPs.
+ * rgerhards, 2008-02-26
+ */
+ if(pLoadedModulesLast != NULL)
+ pLoadedModulesLast->pNext = NULL;
+
return iRet;
}
/*