Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2005-02-02 22:29:18 UTC
Modified files:
ircd/motd.c ChangeLog
Log message:
Always initialize MOTD hostmask pointer.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.545 ircu2.10/ChangeLog:1.546
--- ircu2.10/ChangeLog:1.545 Wed Feb 2 14:28:15 2005
+++ ircu2.10/ChangeLog Wed Feb 2 14:29:08 2005
@@ -10,6 +10,9 @@
G-lines by plain hostname (not [EMAIL PROTECTED]), thus preventing
"GLINE
test ..." from inserting duplicate G-lines.
+ * ircd/motd.c (motd_create): Null out new Motd's hostmask when
+ appropriate, avoiding an uninitialized or stale pointer.
+
2005-01-26 Michael Poole <[EMAIL PROTECTED]>
* include/ircd_alloc.h (DoMallocZero): Parenthesize macro
Index: ircu2.10/ircd/motd.c
diff -u ircu2.10/ircd/motd.c:1.20 ircu2.10/ircd/motd.c:1.21
--- ircu2.10/ircd/motd.c:1.20 Fri Dec 10 21:14:04 2004
+++ ircu2.10/ircd/motd.c Wed Feb 2 14:29:07 2005
@@ -23,7 +23,7 @@
*/
/** @file
* @brief Message-of-the-day manipulation implementation.
- * @version $Id: motd.c,v 1.20 2004/12/11 05:14:04 klmitch Exp $
+ * @version $Id: motd.c,v 1.21 2005/02/02 22:29:07 entrope Exp $
*/
#include "config.h"
@@ -94,6 +94,8 @@
if (hostmask != NULL)
DupString(tmp->hostmask, hostmask);
+ else
+ tmp->hostmask = NULL;
DupString(tmp->path, path);
tmp->maxcount = maxcount;
----------------------- End of diff -----------------------