diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-04-16 19:03:50 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-04-16 19:03:50 (GMT) |
commit | b9a742cb40113c2ef73661316577162125e8fb22 (patch) | |
tree | fac953c1dd24239eff65b65b134c69b440fa4d2a /generic | |
parent | b9dc2232f789179c479e71428d9dafebcf27c072 (diff) | |
download | tcl-b9a742cb40113c2ef73661316577162125e8fb22.zip tcl-b9a742cb40113c2ef73661316577162125e8fb22.tar.gz tcl-b9a742cb40113c2ef73661316577162125e8fb22.tar.bz2 |
Fix [0061c7a476]: signed integer overflow in ZipReadInt()
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclZipfs.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 |