From b9a742cb40113c2ef73661316577162125e8fb22 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sat, 16 Apr 2022 19:03:50 +0000 Subject: Fix [0061c7a476]: signed integer overflow in ZipReadInt() --- generic/tclZipfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c index c936a15..61dc615 100644 --- a/generic/tclZipfs.c +++ b/generic/tclZipfs.c @@ -467,7 +467,8 @@ ZipReadInt( Tcl_Panic("out of bounds read(4): start=%p, end=%p, ptr=%p", bufferStart, bufferEnd, ptr); } - return ptr[0] | (ptr[1] << 8) | (ptr[2] << 16) | (ptr[3] << 24); + return ptr[0] | (ptr[1] << 8) | (ptr[2] << 16) | + ((unsigned int)ptr[3] << 24); } static inline unsigned short -- cgit v0.12