File cyrus-imapd_nntp-overflow.dif of Package cyrus-imapd.import5240

Index: cyrus-imapd-2.3.11/imap/nntpd.c
===================================================================
--- cyrus-imapd-2.3.11.orig/imap/nntpd.c
+++ cyrus-imapd-2.3.11/imap/nntpd.c
@@ -4107,7 +4107,8 @@ static struct wildmat *split_wildmats(ch
 	else if (*c == '@') wild[n].not = -1;	/* absolute not (feeding) */
 	else wild[n].not = 0;
 
-	strcpy(p, wild[n].not ? c + 1 : c);
+	strncpy(p, wild[n].not ? c + 1 : c, pattern+sizeof(pattern) - p);
+	pattern[sizeof(pattern)-1] = '\0';
 	wild[n++].pat = xstrdup(pattern);
     } while (c != str);
     wild[n].pat = NULL;