2003-05-13 20:52:36 -04:00
|
|
|
$OpenBSD: patch-source_names_c,v 1.2 2003/05/14 00:52:36 brad Exp $
|
|
|
|
--- source/names.c.orig Tue May 13 18:30:05 2003
|
|
|
|
+++ source/names.c Tue May 13 18:29:59 2003
|
2003-03-27 10:46:11 -05:00
|
|
|
@@ -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)
|
2003-05-13 20:52:36 -04:00
|
|
|
@@ -738,7 +738,8 @@ NickList *tnl = NULL;
|
2003-03-27 10:46:11 -05:00
|
|
|
|
|
|
|
/* modes which can be done multiple times are added here */
|
|
|
|
|
|
|
|
- for (tucm = ucm; tucm; tucm = tucm->next)
|
2003-05-13 20:52:36 -04:00
|
|
|
+ for (tucm = ucm; tucm && (strlen(nmodes) + 2) < sizeof nmodes;
|
|
|
|
+ tucm = tucm->next)
|
2003-03-27 10:46:11 -05:00
|
|
|
{
|
|
|
|
if (tucm->o_ed)
|
|
|
|
{
|
2003-05-13 20:52:36 -04:00
|
|
|
@@ -995,8 +996,9 @@ static int decifer_mode(char *from, char
|
|
|
|
malloc_strcpy(key, next_arg(rest, &rest));
|
|
|
|
else
|
|
|
|
{
|
|
|
|
- if (rest && *key && !my_strnicmp(rest, *key, strlen(*key)))
|
|
|
|
+ if (rest && *key && (!my_strnicmp(rest, *key, strlen(*key)) || rest[0] == '*'))
|
|
|
|
next_arg(rest, &rest);
|
|
|
|
+
|
|
|
|
new_free(key);
|
|
|
|
}
|
|
|
|
(*channel)->i_mode = -1;
|