CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected]        2022/06/17 21:23:19

Modified files:
        usr.bin/compress: gzopen.c 

Log message:
Fix gzip byte counts with 32-bit integers

If zlib is without our local change in lib/libz/zlib.h r1.7, then
s->z_stream.total_in and s->z_stream.total_out might overflow on
architectures where uLong has 32 bits.  After overflow, the total
would be 4G below the correct total.

Calculate our own 64-bit totals.  When decompressing, take
(uLong)s->z_stream.total_in as a total modulo ULONG_MAX + 1.

ok tb@

Reply via email to