summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2011-04-21 16:53:44 (GMT)
committerdgp <dgp@noemail.net>2011-04-21 16:53:44 (GMT)
commit2a1de6731749d028cf99d91b1f13bde641463c08 (patch)
tree52c343f306e6cc25dc62d6895972cdf716e9c45b /generic/tclInt.h
parent8ffca00c252fc6b8bd5a411c2d0db20a45adfb71 (diff)
downloadtcl-2a1de6731749d028cf99d91b1f13bde641463c08.zip
tcl-2a1de6731749d028cf99d91b1f13bde641463c08.tar.gz
tcl-2a1de6731749d028cf99d91b1f13bde641463c08.tar.bz2
Limits on list length were too strict. Revised panics to errors where possible.
FossilOrigin-Name: 9080c06a95b9e99177a57c48412129dd0a093400
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.
*/