[cvslog] [CVS] Module eggdrop1.8: Change committed

cvs at eggheads.org cvs at eggheads.org
Fri Jul 8 17:14:27 CST 2011


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.8
Branch tags: gettext
Commit time: 2011-07-08 23:14:27 UTC
Committer  : Thomas Sader <thommey at gmail.com>

Modified files:
  Tag: gettext
     doc/Changes1.8 src/patch.h src/tclhash.c

Log message:

Fix Tcl8.5.10 memory corruption bug related to Tcl_ScanElement and Tcl_ConvertElement.

---------------------- diff included ----------------------
Index: eggdrop1.8/doc/Changes1.8
diff -u eggdrop1.8/doc/Changes1.8:1.36.2.17 eggdrop1.8/doc/Changes1.8:1.36.2.18
--- eggdrop1.8/doc/Changes1.8:1.36.2.17	Sun Mar 13 21:03:13 2011
+++ eggdrop1.8/doc/Changes1.8	Fri Jul  8 17:14:17 2011
@@ -1,4 +1,4 @@
-$Id: Changes1.8,v 1.36.2.17 2011/03/14 03:03:13 thommey Exp $
+$Id: Changes1.8,v 1.36.2.18 2011/07/08 23:14:17 thommey Exp $
 
 Eggdrop Changes (since version 1.8.0)
 
@@ -6,6 +6,11 @@
 
 1.8.0 (CVS):
 
+  - Make sure to account for null termination when using Tcl_ScanElement
+    to generate a string representation of a list using Tcl_ConvertElement.
+    A behavioural change in Tcl8.5.10 revealed this bug.
+    Found by: various / Patch by: thommey
+
   - Moved variable declarations to conform to C89 (beginning of blocks only).
     Found by: Anon-e-mouse / Patch by: thommey
 
Index: eggdrop1.8/src/patch.h
diff -u eggdrop1.8/src/patch.h:1.25.2.14 eggdrop1.8/src/patch.h:1.25.2.15
--- eggdrop1.8/src/patch.h:1.25.2.14	Sat Feb 26 13:26:53 2011
+++ eggdrop1.8/src/patch.h	Fri Jul  8 17:14:17 2011
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  *
- * $Id: patch.h,v 1.25.2.14 2011/02/26 19:26:53 thommey Exp $
+ * $Id: patch.h,v 1.25.2.15 2011/07/08 23:14:17 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("1298748262");            /* current unixtime */
+patch("1310166824");            /* current unixtime */
 /*
  *
  *
  */
-patch("publistennoident");
+patch("tclliststr");
 /*
  *
  *
Index: eggdrop1.8/src/tclhash.c
diff -u eggdrop1.8/src/tclhash.c:1.3.2.3 eggdrop1.8/src/tclhash.c:1.3.2.4
--- eggdrop1.8/src/tclhash.c:1.3.2.3	Tue Feb  8 16:06:01 2011
+++ eggdrop1.8/src/tclhash.c	Fri Jul  8 17:14:17 2011
@@ -7,7 +7,7 @@
  *   (non-Tcl) procedure lookups for msg/dcc/file commands
  *   (Tcl) binding internal procedures to msg/dcc/file commands
  *
- * $Id: tclhash.c,v 1.3.2.3 2011/02/08 22:06:01 thommey Exp $
+ * $Id: tclhash.c,v 1.3.2.4 2011/07/08 23:14:17 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -1316,7 +1316,7 @@
   for (i = 0; cc[i].name; i++) {
     egg_snprintf(p, sizeof p, "*%s:%s", tl->name,
                  cc[i].funcname ? cc[i].funcname : cc[i].name);
-    l = nmalloc(Tcl_ScanElement(p, &k));
+    l = nmalloc(Tcl_ScanElement(p, &k) + 1);
     Tcl_ConvertElement(p, l, k | TCL_DONT_USE_BRACES);
     table[0].cdata = (void *) cc[i].func;
     add_cd_tcl_cmds(table);
@@ -1334,7 +1334,7 @@
   for (i = 0; cc[i].name; i++) {
     egg_snprintf(p, sizeof p, "*%s:%s", table->name,
                  cc[i].funcname ? cc[i].funcname : cc[i].name);
-    l = nmalloc(Tcl_ScanElement(p, &k));
+    l = nmalloc(Tcl_ScanElement(p, &k) + 1);
     Tcl_ConvertElement(p, l, k | TCL_DONT_USE_BRACES);
     Tcl_DeleteCommand(interp, p);
     unbind_bind_entry(table, cc[i].flags, cc[i].name, l);
----------------------- End of diff -----------------------


More information about the Changes mailing list