]> git.pld-linux.org Git - packages/BitchX.git/commitdiff
- Fix crash when some channel modes are used
authorciril <ciril@pld-linux.org>
Sat, 10 May 2003 20:44:06 +0000 (20:44 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    BitchX-names.patch -> 1.1

BitchX-names.patch [new file with mode: 0644]

diff --git a/BitchX-names.patch b/BitchX-names.patch
new file mode 100644 (file)
index 0000000..95b1522
--- /dev/null
@@ -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);
+                       }
This page took 0.081596 seconds and 4 git commands to generate.