slide_hash() knowingly reads potentially uninitialized memory, see
comment lower down about prev[n] potentially being garbage. In
this case, the result is never used.
This also adds --address for the address sanitizer, in addition to
the existing --sanitizer. -fno-omit-frame-pointer has been added
for both sanitizers to improve the error reporting.
zlib does not use time_t, so _TIME_BITS is irrelevant. However it
may be defined anyway as part of a sledgehammer indiscriminately
applied to all builds.
The comment said that the os is set to 255, when in fact it has
been set to the current os since zlib 1.2.3. Or at least our best
guess at the os made at compile time.
C2X has removed K&R definitions from the C function syntax.
Though the standard has not yet been approved, some high-profile
compilers are now issuing warnings when such definitions are
encountered.
The inflate() functions never leave state->bits greater than 24, so
an inflatePrime() call could not cause this. The only way this
could have happened would be by using inflatePrime() to fill the
bit buffer with 32 bits, and then calling inflatePrime() a *second*
time asking to insert zero bits, for some reason. This commit
assures that a shift by 32 bits does not occur even in that case.
Z_SOLO defines z_size_t as an unsigned long. However Windows and
MinGW-w64 are LLP64, where a long is 32 bits, but a size_t is 64
bits. This makes z_size_t, used by adler32_z() and crc32_z(), 64
bits on those systems.
memLevel 9 would cause deflateBound() to assume the use of fixed
blocks, even if the compression level was 0, which forces stored
blocks. That could result in a bound less than the size of the
compressed data. Now level 0 always uses the stored blocks bound.