From af5bfc68cc1b458f1965b957bae448035b4c09a1 Mon Sep 17 00:00:00 2001 From: pooryorick Date: Mon, 8 May 2023 11:35:45 +0000 Subject: Use Tcl_Size instead of size_t in two places in TclIndexEncode. --- generic/tclUtil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclUtil.c b/generic/tclUtil.c index d883729..a5c1595 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -3849,7 +3849,7 @@ TclIndexEncode( * error is raised. On 32-bit systems, indices in that range indicate * the position after the end and so do not raise an error. */ - if ((sizeof(int) != sizeof(size_t)) && + if ((sizeof(int) != sizeof(Tcl_Size)) && (wide > INT_MAX) && (wide < WIDE_MAX-1)) { /* 2(a,b) on 64-bit systems*/ goto rangeerror; @@ -3879,7 +3879,7 @@ TclIndexEncode( * indices in that range indicate the position before the beginning * and so do not raise an error. */ - if ((sizeof(int) != sizeof(size_t)) && + if ((sizeof(int) != sizeof(Tcl_Size)) && (wide > (ENDVALUE - LIST_MAX)) && (wide <= INT_MAX)) { /* 1(c), 4(a,b) on 64-bit systems */ goto rangeerror; -- cgit v0.12