$NetBSD: patch-ak,v 1.1 2003/03/29 21:20:30 salo Exp $

Fixes potential remote buffer overflows.  See the following url for more
details:  http://securityfocus.com/archive/1/315057

Patch by caf@guarana.org.

--- source/notice.c.orig	2003-03-29 21:55:24.000000000 +0100
+++ source/notice.c	2003-03-29 21:55:51.000000000 +0100
@@ -425,7 +425,7 @@
 		int conn = !strncmp(line+7, "connect", 7) ? 1 : 0;
 		int dalnet = 0, ircnet = 0;
 
-		if (*(line+18) == ':')
+		if (strlen(line) >= 19 && line[18] == ':')
 			q = NULL;
 		else
 			dalnet = (q == NULL);
