summaryrefslogtreecommitdiffstats
path: root/generic/tclUtil.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r--generic/tclUtil.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index f230094..41e5555 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -1549,7 +1549,8 @@ Tcl_Merge(
{
#define LOCAL_SIZE 64
char localFlags[LOCAL_SIZE];
- int i, bytesNeeded = 0;
+ int i;
+ size_t bytesNeeded = 0;
char *result, *dst, *flagPtr = NULL;
/*
@@ -1575,12 +1576,6 @@ Tcl_Merge(
for (i = 0; i < argc; i++) {
flagPtr[i] = ( i ? TCL_DONT_QUOTE_HASH : 0 );
bytesNeeded += TclScanElement(argv[i], -1, &flagPtr[i]);
- if (bytesNeeded < 0) {
- Tcl_Panic("max size for a Tcl value (%d bytes) exceeded", INT_MAX);
- }
- }
- if (bytesNeeded > INT_MAX - argc + 1) {
- Tcl_Panic("max size for a Tcl value (%d bytes) exceeded", INT_MAX);
}
bytesNeeded += argc;