[cvslog] Module eggdrop1.6: Change committed

cvslog cvs at tsss.org
Wed Oct 31 09:23:00 CST 2001


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2001-10-31 15:22:58 UTC
Commited by: Matthew Hallacy <poptix at techmonkeys.org>

Modified files:
     doc/UPDATES1.6 src/patch.h src/tcluser.c

Log message:

more (all of?) the argv mis-usage

---------------------- diff included ----------------------
Index: eggdrop1.6/doc/UPDATES1.6
diff -u eggdrop1.6/doc/UPDATES1.6:1.201 eggdrop1.6/doc/UPDATES1.6:1.202
--- eggdrop1.6/doc/UPDATES1.6:1.201	Tue Oct 30 20:20:55 2001
+++ eggdrop1.6/doc/UPDATES1.6	Wed Oct 31 09:22:48 2001
@@ -1,10 +1,11 @@
-$Id: UPDATES1.6,v 1.201 2001/10/31 02:20:55 guppy Exp $
+$Id: UPDATES1.6,v 1.202 2001/10/31 15:22:48 poptix Exp $
 
 Changes in eggdrop: (since v1.6.0)
 ----------------------------------
 
 1.6.7
 Found by  Fixed by  What...
+	  poptix    even more fixes for usage of argv[] (crashes)
 dfrank    stdarg    'chattr hand' no longer crashes (legacy bug)
           poptix    this should fix the banreason bug (Hey, i tested it too)
 zip       guppy     small fix for ircu servers that send ERROR: instead of ERROR :
Index: eggdrop1.6/src/patch.h
diff -u eggdrop1.6/src/patch.h:1.572 eggdrop1.6/src/patch.h:1.573
--- eggdrop1.6/src/patch.h:1.572	Tue Oct 30 20:20:56 2001
+++ eggdrop1.6/src/patch.h	Wed Oct 31 09:22:48 2001
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  *
- * $Id: patch.h,v 1.572 2001/10/31 02:20:56 guppy Exp $
+ * $Id: patch.h,v 1.573 2001/10/31 15:22:48 poptix Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("1004494643");		/* current unixtime */
+patch("1004541483");		/* current unixtime */
 /*
  *
  *
  */
-patch("chattrcrash");
+patch("argv2");
 /*
  *
  *
Index: eggdrop1.6/src/tcluser.c
diff -u eggdrop1.6/src/tcluser.c:1.24 eggdrop1.6/src/tcluser.c:1.25
--- eggdrop1.6/src/tcluser.c:1.24	Tue Oct 30 20:20:56 2001
+++ eggdrop1.6/src/tcluser.c	Wed Oct 31 09:22:48 2001
@@ -2,7 +2,7 @@
  * tcluser.c -- handles:
  *   Tcl stubs for the user-record-oriented commands
  *
- * $Id: tcluser.c,v 1.24 2001/10/31 02:20:56 guppy Exp $
+ * $Id: tcluser.c,v 1.25 2001/10/31 15:22:48 poptix Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -190,7 +190,7 @@
   } else {
     user.match = FR_BOT;
     chan = NULL;
-    chg = argv[2];
+    chg = NULL;
   }
   if (chan && !findchan_by_dname(chan)) {
     Tcl_AppendResult(irp, "no such channel", NULL);
@@ -226,8 +226,7 @@
   int ok = 0, f;
 
   BADARGS(3, 4, " handle flags ?channel?");
-  if ((u = get_user_by_handle(userlist, argv[1])) &&
-      ((argc == 3) || findchan_by_dname(argv[3]))) {
+  if ((u = get_user_by_handle(userlist, argv[1]))) {
     user.match = FR_GLOBAL | (argc == 4 ? FR_CHAN : 0) | FR_BOT;
     get_user_flagrec(u, &user, argv[3]);
     plus.match = user.match;
@@ -342,10 +341,10 @@
   for (u = userlist; u; u = u->next) {
     if (argc >= 2) {
       user.match = FR_GLOBAL | FR_CHAN | FR_BOT | (argc == 3 ? 0 : FR_ANYWH);
-      if (argc == 2) 
-	      get_user_flagrec(u, &user, NULL);
-      else
+      if (argc == 3) 
 	      get_user_flagrec(u, &user, argv[2]);
+      else
+	      get_user_flagrec(u, &user, NULL);
 
       if (flagrec_eq(&plus, &user) && !(f && flagrec_eq(&minus, &user)))
 	ok = 1;
@@ -437,10 +436,10 @@
   if (argc == 4)
      expire_time = now + (60 * ignore_time);
   else {
-    if (atol(argv[4]) == 0)
+    if (argc == 5 && atol(argv[4]) == 0)
       expire_time = 0L;
     else
-      expire_time = now + (60 * atol(argv[4]));
+      expire_time = now + (60 * atol(argv[4])); /* This is a potential crash. FIXME  -poptix */
   }
   addignore(ign, from, cmt, expire_time);
   return TCL_OK;
----------------------- End of diff -----------------------



More information about the Changes mailing list