summaryrefslogtreecommitdiffstats
path: root/generic/tclObj.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclObj.c')
-rw-r--r--generic/tclObj.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c
index 38800bf..c96ddc7 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -1692,7 +1692,7 @@ Tcl_GetStringFromObj(
(void) TclGetString(objPtr);
if (lengthPtr != NULL) {
- *lengthPtr = objPtr->length;
+ *lengthPtr = (objPtr->length < INT_MAX)? objPtr->length: INT_MAX;
}
return objPtr->bytes;
}