summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclCmdMZ.c4
-rw-r--r--generic/tclExecute.c4
3 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 9b54cfc..cd5c822 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-05-06 Don Porter <dgp@users.sourceforge.net>
+
+ * generic/tclCmdMZ.c: Improve overflow error message from
+ [string repeat]. [Bug 2582327]
+
2009-04-28 Jeff Hobbs <jeffh@ActiveState.com>
* unix/tcl.m4, unix/configure (SC_CONFIG_CFLAGS): harden the check
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 0e5330d..5a88a6f 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -15,7 +15,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdMZ.c,v 1.163.2.2 2009/02/04 18:57:47 dgp Exp $
+ * RCS: @(#) $Id: tclCmdMZ.c,v 1.163.2.3 2009/05/06 20:16:55 dgp Exp $
*/
#include "tclInt.h"
@@ -2141,7 +2141,7 @@ StringReptCmd(
if (count > (INT_MAX / length1)) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "max size for a Tcl value (%d bytes) exceeded", INT_MAX));
+ "result exceeds max size for a Tcl value (%d bytes)", INT_MAX));
return TCL_ERROR;
}
length2 = length1 * count;
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 3bf099e..c1b13b5 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclExecute.c,v 1.369.2.7 2009/03/20 14:35:06 dgp Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.369.2.8 2009/05/06 20:16:55 dgp Exp $
*/
#include "tclInt.h"
@@ -2121,6 +2121,7 @@ TclExecuteByteCode(
}
if (appendLen < 0) {
+ /* TODO: convert panic to error ? */
Tcl_Panic("max size for a Tcl value (%d bytes) exceeded", INT_MAX);
}
@@ -2148,6 +2149,7 @@ TclExecuteByteCode(
objResultPtr = OBJ_AT_DEPTH(opnd-1);
bytes = TclGetStringFromObj(objResultPtr, &length);
if (length + appendLen < 0) {
+ /* TODO: convert panic to error ? */
Tcl_Panic("max size for a Tcl value (%d bytes) exceeded", INT_MAX);
}
#if !TCL_COMPILE_DEBUG