34 lines
1.0 KiB
Plaintext
34 lines
1.0 KiB
Plaintext
$OpenBSD: patch-source_names_c,v 1.3 2009/03/24 21:43:10 naddy Exp $
|
|
--- source/names.c.orig Mon Jan 8 07:24:22 2001
|
|
+++ source/names.c Tue Mar 24 22:41:56 2009
|
|
@@ -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,8 @@ 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)
|
|
{
|
|
@@ -995,8 +996,9 @@ static int decifer_mode(char *from, char *mode_str, Ch
|
|
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;
|