blob: 3819790b763fa54a38e6e28c449fb46f55bc8db3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
$NetBSD: patch-am,v 1.2 2007/10/18 09:15:34 obache Exp $
Fix for http://www.eggheads.org/bugzilla/show_bug.cgi?id=462
--- src/mod/server.mod/servmsg.c.orig 2006-03-28 02:35:51.000000000 +0000
+++ src/mod/server.mod/servmsg.c
@@ -461,7 +461,8 @@ static int gotmsg(char *from, char *msg)
to = newsplit(&msg);
fixcolon(msg);
/* Only check if flood-ctcp is active */
- strcpy(uhost, from);
+ strncpy(uhost, from, UHOSTMAX);
+ uhost[UHOSTMAX] = '\0';
nick = splitnick(&uhost);
if (flud_ctcp_thr && detect_avalanche(msg)) {
if (!ignoring) {
|