[cvslog] Module eggdrop1.7: Change committed

cvslog cvs at tsss.org
Sat Dec 1 10:04:01 CST 2001


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.7
Commit time: 2001-12-01 16:03:59 UTC
Commited by: Federico Mennite <ite at techmonkeys.org>

Modified files:
     src/tcluser.c

Log message:

Fixed more potential crashes in src/tcluser.c. Patch by Matthew Hallacy <poptix at techmonkeys.org>

---------------------- diff included ----------------------
Index: eggdrop1.7/src/tcluser.c
diff -u eggdrop1.7/src/tcluser.c:1.29 eggdrop1.7/src/tcluser.c:1.30
--- eggdrop1.7/src/tcluser.c:1.29	Sat Dec  1 09:13:49 2001
+++ eggdrop1.7/src/tcluser.c	Sat Dec  1 10:03:48 2001
@@ -2,7 +2,7 @@
  * tcluser.c -- handles:
  *   Tcl stubs for the user-record-oriented commands
  *
- * $Id: tcluser.c,v 1.29 2001/12/01 15:13:49 ite Exp $
+ * $Id: tcluser.c,v 1.30 2001/12/01 16:03:48 ite 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;
@@ -451,10 +450,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