summaryrefslogtreecommitdiffstats
path: root/generic/tclBinary.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-26 15:04:16 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-26 15:04:16 (GMT)
commit59eeb967a221a65eafeceea7460f438892396ef7 (patch)
tree4f2796040b1c60486b26aa2ac3853f95d971c685 /generic/tclBinary.c
parent50b5581156fef0c05550efc25526d3ffeac13523 (diff)
downloadtcl-59eeb967a221a65eafeceea7460f438892396ef7.zip
tcl-59eeb967a221a65eafeceea7460f438892396ef7.tar.gz
tcl-59eeb967a221a65eafeceea7460f438892396ef7.tar.bz2
Many internal int -> size_t increases, so string lengths > 2Gb can be handled correctly in many more places.
Diffstat (limited to 'generic/tclBinary.c')
-rw-r--r--generic/tclBinary.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/generic/tclBinary.c b/generic/tclBinary.c
index b270499..f3d648f 100644
--- a/generic/tclBinary.c
+++ b/generic/tclBinary.c
@@ -1111,7 +1111,7 @@ BinaryFormatCmd(
case 'B': {
unsigned char *last;
- str = TclGetStringFromObj(objv[arg], &length);
+ str = Tcl_GetStringFromObj(objv[arg], &length);
arg++;
if (count == BINARY_ALL) {
count = length;
@@ -1173,7 +1173,7 @@ BinaryFormatCmd(
unsigned char *last;
int c;
- str = TclGetStringFromObj(objv[arg], &length);
+ str = Tcl_GetStringFromObj(objv[arg], &length);
arg++;
if (count == BINARY_ALL) {
count = length;
@@ -2489,7 +2489,8 @@ BinaryDecodeHex(
Tcl_Obj *resultObj = NULL;
unsigned char *data, *datastart, *dataend;
unsigned char *begin, *cursor, c;
- int i, index, value, size, count = 0, cut = 0, strict = 0;
+ int i, index, value, size, cut = 0, strict = 0;
+ size_t count = 0;
enum {OPT_STRICT };
static const char *const optStrings[] = { "-strict", NULL };
@@ -2609,7 +2610,7 @@ BinaryEncode64(
unsigned char *data, *cursor, *limit;
int maxlen = 0;
const char *wrapchar = "\n";
- int wrapcharlen = 1;
+ size_t wrapcharlen = 1;
int offset, i, index, size, outindex = 0, count = 0;
enum {OPT_MAXLEN, OPT_WRAPCHAR };
static const char *const optStrings[] = { "-maxlen", "-wrapchar", NULL };
@@ -2830,7 +2831,8 @@ BinaryDecodeUu(
Tcl_Obj *resultObj = NULL;
unsigned char *data, *datastart, *dataend;
unsigned char *begin, *cursor;
- int i, index, size, count = 0, strict = 0, lineLen;
+ int i, index, size, strict = 0, lineLen;
+ size_t count = 0;
unsigned char c;
enum {OPT_STRICT };
static const char *const optStrings[] = { "-strict", NULL };
@@ -2995,7 +2997,8 @@ BinaryDecode64(
unsigned char *begin = NULL;
unsigned char *cursor = NULL;
int strict = 0;
- int i, index, size, cut = 0, count = 0;
+ int i, index, size, cut = 0;
+ size_t count = 0;
enum { OPT_STRICT };
static const char *const optStrings[] = { "-strict", NULL };