22 lines
665 B
Plaintext
22 lines
665 B
Plaintext
$OpenBSD: patch-source_names_c,v 1.1 2003/03/27 15:46:11 brad Exp $
|
|
--- source/names.c.orig Mon Jan 8 01:24:22 2001
|
|
+++ source/names.c Wed Mar 26 23:00:45 2003
|
|
@@ -568,7 +568,7 @@ NickList *tnl = NULL;
|
|
|
|
*nmodes = 0;
|
|
*nargs = 0;
|
|
- for (; *modes; modes++)
|
|
+ for (; *modes && (strlen(nmodes) + 2) < sizeof nmodes; modes++)
|
|
{
|
|
isbanned = isopped = isvoiced = 0;
|
|
switch (*modes)
|
|
@@ -738,7 +738,7 @@ NickList *tnl = NULL;
|
|
|
|
/* modes which can be done multiple times are added here */
|
|
|
|
- for (tucm = ucm; tucm; tucm = tucm->next)
|
|
+ for (tucm = ucm; tucm && (strlen(nmodes) + 2) < sizeof nmodes; tucm = tucm->next)
|
|
{
|
|
if (tucm->o_ed)
|
|
{
|