From 5546ef543401e08cac7b1ab257e5a2f82a27c6e3 Mon Sep 17 00:00:00 2001 From: Vindaar Date: Sat, 21 Oct 2023 13:40:04 +0200 Subject: [PATCH] fix `isize` check to be mod 2^32 instead 2^31 --- src/zippy/gzip.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zippy/gzip.nim b/src/zippy/gzip.nim index 0fa012e..94502bd 100644 --- a/src/zippy/gzip.nim +++ b/src/zippy/gzip.nim @@ -73,5 +73,5 @@ proc uncompressGzip*( if checksum != crc32(dst): raise newException(ZippyError, "Checksum verification failed") - if isize != (dst.len mod (1 shl 31)).uint32: + if isize != (dst.len mod (1 shl 32)).uint32: raise newException(ZippyError, "Size verification failed")