blob: 49be360076390e555e60cd7fd6312b770608b7aa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
$NetBSD: patch-am,v 1.1 2007/05/22 16:47:05 lkundrak Exp $
Fix for http://www.eggheads.org/bugzilla/show_bug.cgi?id=462
--- src/mod/server.mod/servmsg.c.orig 2007-05-22 18:29:49.000000000 +0200
+++ src/mod/server.mod/servmsg.c
@@ -424,7 +424,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) {
|