[cvslog] Module eggdrop1.6: Change committed

cvslog cvs at tsss.org
Sun Oct 14 11:14:00 CST 2001


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2001-10-14 16:13:08 UTC
Commited by: Matthew Hallacy <poptix at techmonkeys.org>

Modified files:
     doc/UPDATES1.6 src/userrec.c

Log message:

fix overflow in adduser, free what we malloc

---------------------- diff included ----------------------
Index: eggdrop1.6/doc/UPDATES1.6
diff -u eggdrop1.6/doc/UPDATES1.6:1.192 eggdrop1.6/doc/UPDATES1.6:1.193
--- eggdrop1.6/doc/UPDATES1.6:1.192	Sun Oct 14 10:06:34 2001
+++ eggdrop1.6/doc/UPDATES1.6	Sun Oct 14 11:12:57 2001
@@ -1,10 +1,11 @@
-$Id: UPDATES1.6,v 1.192 2001/10/14 15:06:34 tothwolf Exp $
+$Id: UPDATES1.6,v 1.193 2001/10/14 16:12:57 poptix Exp $
 
 Changes in eggdrop: (since v1.6.0)
 ----------------------------------
 
 1.6.7
 Found by  Fixed by  What...
+          poptix    re-fix adduser overflow
           Tothwolf  don't attempt to flood check server notices
           Tothwolf  display global bans, exempts and invites even if
                     not on a channel
Index: eggdrop1.6/src/userrec.c
diff -u eggdrop1.6/src/userrec.c:1.33 eggdrop1.6/src/userrec.c:1.34
--- eggdrop1.6/src/userrec.c:1.33	Tue Oct  9 12:23:21 2001
+++ eggdrop1.6/src/userrec.c	Sun Oct 14 11:12:57 2001
@@ -4,7 +4,7 @@
  *   a bunch of functions to find and change user records
  *   change and check user (and channel-specific) flags
  *
- * $Id: userrec.c,v 1.33 2001/10/09 17:23:21 tothwolf Exp $
+ * $Id: userrec.c,v 1.34 2001/10/14 16:12:57 poptix Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -615,9 +615,11 @@
     xk = nmalloc(sizeof(struct xtra_key));
     xk->key = nmalloc(8);
     strcpy(xk->key, "created");
-    xk->data = nmalloc(sizeof(time_t));
-    sprintf(xk->data, "%lu", now);
+    xk->data = nmalloc(15);              /* should be enough, this should be changed  */
+    sprintf(xk->data, "%lu", now);      /* when time_t is a 64 bit integer.. -poptix */
     set_user(&USERENTRY_XTRA, u, xk);
+    nfree(xk->data);
+    nfree(xk);
   }
   /* Strip out commas -- they're illegal */
   if (host && host[0]) {
----------------------- End of diff -----------------------



More information about the Changes mailing list