Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2006-12-31 04:37:25 UTC
Modified files:
ChangeLog ircd/ircd_string.c
Log message:
Fix SourceForge bug #1624415 by forcing ircd_strncpy() termination.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.826 ircu2.10/ChangeLog:1.827
--- ircu2.10/ChangeLog:1.826 Sat Dec 30 20:16:21 2006
+++ ircu2.10/ChangeLog Sat Dec 30 20:37:15 2006
@@ -1,5 +1,10 @@
2006-12-30 Michael Poole <[EMAIL PROTECTED]>
+ * ircd/ircd_string.c (ircd_strncpy): Make sure the output buffer
+ is terminated. We don't rely on the arguable strncpy semantics.
+
+2006-12-30 Michael Poole <[EMAIL PROTECTED]>
+
* include/struct.h (struct Server): Add asll_last field.
* ircd/ircd.c (check_pings): Add check for asll_last. When a
Index: ircu2.10/ircd/ircd_string.c
diff -u ircu2.10/ircd/ircd_string.c:1.24 ircu2.10/ircd/ircd_string.c:1.25
--- ircu2.10/ircd/ircd_string.c:1.24 Mon Sep 12 09:11:58 2005
+++ ircu2.10/ircd/ircd_string.c Sat Dec 30 20:37:15 2006
@@ -18,7 +18,7 @@
*/
/** @file
* @brief Implementation of string operations.
- * @version $Id: ircd_string.c,v 1.24 2005/09/12 16:11:58 entrope Exp $
+ * @version $Id: ircd_string.c,v 1.25 2006/12/31 04:37:15 entrope Exp $
*/
#include "config.h"
@@ -156,6 +156,8 @@
while (s < endp && (*s++ = *s2++))
;
+ if (s == endp)
+ *s = '\0';
return s1;
}
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches