From: ciril Date: Sat, 10 May 2003 20:44:06 +0000 (+0000) Subject: - Fix crash when some channel modes are used X-Git-Tag: auto/ac/BitchX-1_0c19-6~7 X-Git-Url: https://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=1fb5f65cd2ad48feb67f35638bc7e78c03d63d44;p=packages%2FBitchX.git - Fix crash when some channel modes are used Changed files: BitchX-names.patch -> 1.1 --- diff --git a/BitchX-names.patch b/BitchX-names.patch new file mode 100644 index 0000000..95b1522 --- /dev/null +++ b/BitchX-names.patch @@ -0,0 +1,39 @@ +--- BitchX/source/names.c.orig Sat May 10 22:34:52 2003 ++++ BitchX/source/names.c Sat May 10 22:37:48 2003 +@@ -12,7 +12,7 @@ + + + #include "irc.h" +-static char cvsrevision[] = "$Id$"; ++static char cvsrevision[] = "$Id$"; + CVS_REVISION(names_c) + #include "struct.h" + +@@ -572,7 +572,7 @@ + + *nmodes = 0; + *nargs = 0; +- for (; *modes && strlen(nmodes) < sizeof(nmodes)-2; modes++) ++ for (; *modes && (strlen(nmodes) + 2) < sizeof nmodes; modes++) + { + isbanned = isopped = isvoiced = 0; + switch (*modes) +@@ -742,7 +742,8 @@ + + /* modes which can be done multiple times are added here */ + +- for (tucm = ucm; tucm && strlen(nmodes) < sizeof(nmodes)-2; tucm = tucm->next) ++ for (tucm = ucm; tucm && (strlen(nmodes) + 2) < sizeof nmodes; ++ tucm = tucm->next) + { + if (tucm->o_ed) + { +@@ -1003,7 +1004,7 @@ + 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); + }