diff options
author | dgp <dgp@users.sourceforge.net> | 2016-11-18 18:02:04 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2016-11-18 18:02:04 (GMT) |
commit | e2d691eda81e4b943c815e3cb0fc52f62c82b73f (patch) | |
tree | 94118d5bb98d8516ab20fcdf226e4164af0a0544 /generic/tclObj.c | |
parent | 16483765baae1e041496f1abdd615844ca08dba8 (diff) | |
parent | da608f8c614749af16e02de19741cada608d3215 (diff) | |
download | tcl-e2d691eda81e4b943c815e3cb0fc52f62c82b73f.zip tcl-e2d691eda81e4b943c815e3cb0fc52f62c82b73f.tar.gz tcl-e2d691eda81e4b943c815e3cb0fc52f62c82b73f.tar.bz2 |
merge trunk
Diffstat (limited to 'generic/tclObj.c')
-rw-r--r-- | generic/tclObj.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c index 412ecfc..9d7c619 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -3446,13 +3446,11 @@ UpdateStringOfBignum( if (MP_OKAY != mp_radix_size(&bignumVal, 10, &size)) { Tcl_Panic("radix size failure in UpdateStringOfBignum"); } - if (size == 3) { + if (size < 2) { /* - * mp_radix_size() returns 3 when more than INT_MAX bytes would be + * mp_radix_size() returns < 2 when more than INT_MAX bytes would be * needed to hold the string rep (because mp_radix_size ignores - * integer overflow issues). When we know the string rep will be more - * than 3, we can conclude the string rep would overflow our string - * length limits. + * integer overflow issues). * * Note that so long as we enforce our bignums to the size that fits * in a packed bignum, this branch will never be taken. |