diff options
author | dgp <dgp@users.sourceforge.net> | 2011-04-21 17:32:20 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2011-04-21 17:32:20 (GMT) |
commit | d3a0ad0b83779f8b3ad8b665c8a64461dfc56b33 (patch) | |
tree | ff599a870d9438f3b28c983d0ac8121bea25f65b /generic/tclInt.h | |
parent | 7522eeff966d066c292c39a89986a78922d65f73 (diff) | |
parent | fb1e4a18589dcd6dcf8bab488503e3ce89873098 (diff) | |
download | tcl-d3a0ad0b83779f8b3ad8b665c8a64461dfc56b33.zip tcl-d3a0ad0b83779f8b3ad8b665c8a64461dfc56b33.tar.gz tcl-d3a0ad0b83779f8b3ad8b665c8a64461dfc56b33.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.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h index cf32e0d..67aee93 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -2441,6 +2441,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. */ |