Committer  : entrope
CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Branch tags: u2_10_12_branch
Commit time: 2006-06-17 13:09:24 UTC

Modified files:
  Tag: u2_10_12_branch
     ChangeLog ircd/m_pass.c

Log message:

Fix bug in PASS handling.

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.710.2.112 ircu2.10/ChangeLog:1.710.2.113
--- ircu2.10/ChangeLog:1.710.2.112      Thu Jun  8 19:16:17 2006
+++ ircu2.10/ChangeLog  Sat Jun 17 06:09:13 2006
@@ -1,3 +1,7 @@
+2006-06-17  Michael Poole <[EMAIL PROTECTED]>
+
+       * ircd/m_pass.c (mr_pass): Only back 'len' up when it's safe.
+
 2006-06-08  Michael Poole <[EMAIL PROTECTED]>
 
        * ircd/m_whois.c (do_whois): Prefix '*' to names of secret (local)
Index: ircu2.10/ircd/m_pass.c
diff -u ircu2.10/ircd/m_pass.c:1.8.2.1 ircu2.10/ircd/m_pass.c:1.8.2.2
--- ircu2.10/ircd/m_pass.c:1.8.2.1      Wed Feb 15 19:49:54 2006
+++ ircu2.10/ircd/m_pass.c      Sat Jun 17 06:09:14 2006
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_pass.c,v 1.8.2.1 2006/02/16 03:49:54 entrope Exp $
+ * $Id: m_pass.c,v 1.8.2.2 2006/06/17 13:09:14 entrope Exp $
  */
 
 /*
@@ -112,7 +112,9 @@
     len += strlen(parv[arg]);
     password[len++] = ' ';
   }
-  password[--len] = '\0';
+  if (len > 0)
+    --len;
+  password[len] = '\0';
 
   if (EmptyString(password))
     return need_more_params(cptr, "PASS");
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches

Reply via email to