summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2011-04-21 16:53:44 (GMT)
committerdgp <dgp@users.sourceforge.net>2011-04-21 16:53:44 (GMT)
commitfb1e4a18589dcd6dcf8bab488503e3ce89873098 (patch)
tree52c343f306e6cc25dc62d6895972cdf716e9c45b /generic/tclInt.h
parent842312f3957922d5d3255fd5d2a511220f26c748 (diff)
downloadtcl-fb1e4a18589dcd6dcf8bab488503e3ce89873098.zip
tcl-fb1e4a18589dcd6dcf8bab488503e3ce89873098.tar.gz
tcl-fb1e4a18589dcd6dcf8bab488503e3ce89873098.tar.bz2
Limits on list length were too strict. Revised panics to errors where possible.
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r--generic/tclInt.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h
index ca565dd..e410a1d 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -2193,6 +2193,9 @@ typedef struct List {
* accomodate all elements. */
} List;
+#define LIST_MAX \
+ (1 + (int)(((size_t)UINT_MAX - sizeof(List))/sizeof(Tcl_Obj *)))
+
/*
* Macro used to get the elements of a list object.
*/