Vollstrecker
edd88953de
CMake: Add install-target for contrib/testzlib.
2026-01-12 11:10:03 -08:00
Vollstrecker
e62a3ddbe3
CMake: Make final fixes for Windows.
2026-01-12 11:10:03 -08:00
Vollstrecker
883c24b6a2
CMake: Add integration tests.
2026-01-12 11:10:03 -08:00
Vollstrecker
16abbd2952
CMake: Fix MSVC build.
2026-01-12 11:10:03 -08:00
Vollstrecker
dc35cccfa7
CMake: Name tests consistently.
2026-01-12 11:10:03 -08:00
Vollstrecker
c6d16d4c3b
CMake: Name targets consistently.
2026-01-12 11:10:01 -08:00
Vollstrecker
9444f8641b
CMake: Make it work with add_subdirectory.
2026-01-12 11:09:28 -08:00
Vollstrecker
39728a2b00
CMake: Add install and exports.
2026-01-12 11:08:59 -08:00
Vollstrecker
53af7b07e5
CMake: Make the options available in cmake-gui.
2026-01-12 11:08:02 -08:00
Vollstrecker
a8631975bc
CMake: Added contrib/testzlib.
2026-01-12 11:07:43 -08:00
Vollstrecker
fb0479a8bd
CMake: Added contrib/puff.
2026-01-12 10:55:15 -08:00
Vollstrecker
89889debe3
CMake: Removed bogus module-path.
2026-01-12 10:55:15 -08:00
Vollstrecker
1956b5a89f
CMake: Moved everything to functions for consistency.
2026-01-12 10:55:15 -08:00
Vollstrecker
4db1cd9721
CMake: Added contrib/iostream3.
2026-01-12 10:55:15 -08:00
Vollstrecker
fb4bdb7412
CMake: Unify the options.
2026-01-12 10:55:15 -08:00
Vollstrecker
f7df8cc974
CMake: Added contrib/infback9.
2026-01-12 10:55:15 -08:00
Vollstrecker
6f0e6f10b1
CMake: Added contrib/gcc_gvmat64.
2026-01-12 10:55:15 -08:00
Vollstrecker
fe28c0216e
CMake: Filter out optimisation flags for the ada binder.
2026-01-12 10:55:15 -08:00
Vollstrecker
175ff0951a
CMake: Clean out unneeded stuff.
2026-01-12 10:55:15 -08:00
Vollstrecker
5ba29aea46
CMake: Added contrib/blast.
2026-01-12 10:55:15 -08:00
Vollstrecker
b74a346cbf
CMake: Added contrib/ada.
2026-01-12 10:55:15 -08:00
Vollstrecker
fa448d45d6
CMake: Set defaults for contrib/minizip from contrib.
2026-01-12 10:55:15 -08:00
Vollstrecker
3a85de5fcb
CMake: Move contrib options out of main file.
2026-01-12 10:46:34 -08:00
Mark Adler
6598de3581
Remove old subdirectory.
2026-01-12 10:13:28 -08:00
Mark Adler
4edb00de5a
Add _z versions of the compress and uncompress functions.
...
Provide size_t arguments for Windows, on which a long is 32 bits.
2026-01-12 10:13:28 -08:00
Mark Adler
1a40058a92
Remove untgz from contrib.
2026-01-12 09:52:53 -08:00
Mark Adler
ecbaf031f8
Zero inflate state on allocation.
...
To further guard against the propagation of uninitialized memory.
2026-01-11 09:50:44 -08:00
Mark Adler
84045903ee
Copy only the initialized deflate state in deflateCopy.
...
To avoid the propagation and possible disclosure of uninitialized
memory contents.
2026-01-10 21:40:07 -08:00
Mark Adler
edebc8c488
Correct #endif comment in trees.c.
2026-01-10 21:40:07 -08:00
Mark Adler
78832f5fe3
Add --undefined option to ./configure for UBSan checker.
2026-01-10 21:40:07 -08:00
Mark Adler
2896db600d
Correct macro name for ZLIB_INSECURE in c-std.yml.
2026-01-06 13:24:02 -06:00
Mark Adler
f81690699a
Add compiler options to standards in c-std.yml for ZLIB_INSECURE.
2026-01-06 12:59:17 -06:00
Mark Adler
42ca9c2c9b
Add definition of ZLIB_INSECURE to build tests with c89 and c94.
2026-01-06 12:26:30 -06:00
Mark Adler
fee7c52428
Avoid Visual C warning in gzread.c.
2026-01-05 15:03:04 -06:00
Mark Adler
2b250b88a4
Fix links to Mark Nelson's zlib article, now hosted on zlib.net.
2026-01-05 15:03:04 -06:00
Mark Adler
c267ef7306
Use atomics to build inflate fixed tables once.
...
This moves the once code from crc32.c to zutil.c, and uses it also
for building the inflate fixed tables when BUILDFIXED is defined.
The fixed tables are now housed in inftrees.c, shared by inflate.c
and infback.c. The once() function is now external, and so is
renamed to z_once() to avoid name collisions.
If either BUILDFIXED or DYNAMIC_CRC_TABLE is defined, and atomics
are not available, then a warning is issued noting that zlib is not
thread-safe.
2026-01-05 15:03:04 -06:00
Mark Adler
916dc1ac35
Add compressBound_z and deflateBound_z functions for large values.
...
These take and return size_t integers, instead of unsigned longs,
for those platforms with 32-bit longs. This commit also assures
that overflows of either integer type results in the maximum value
for that type, instead of wrapping to small values.
2026-01-05 15:03:04 -06:00
Mark Adler
fd366384cf
Prevent the use of insecure functions without an explicit request.
...
ZLIB_INSECURE must be defined in order to compile code that uses
the insecure functions vsprintf() or sprintf(). This would occur
only if the standard vsnprintf() or snprintf() functions are not
available. Providing the --insecure option to ./configure will
define ZLIB_INSECURE. A flag is added to zlibCompileFlags() to
indicate that gzprintf() is not implemented due to the need for
the use of an insecure function, but ZLIB_INSECURE was not
defined.
2026-01-05 15:03:04 -06:00
Mark Adler
cab7352dc7
Update the link for an snprintf/vsnprintf implementation in FAQ.
...
Point to a modern, well-supported implementation, for use when the
compiler chain in use does not provide those functions, and a
secure alternative to sprintf/vsprintf for the gz functions is
desired.
2026-01-05 15:03:04 -06:00
Mark Adler
3509ab515f
Copy only the initialized window contents in inflateCopy.
...
To avoid the propagation and possible disclosure of uninitialized
memory contents.
2026-01-05 15:03:04 -06:00
Mark Adler
ba829a4585
Check for negative lengths in crc32_combine functions.
...
Though zlib.h says that len2 must be non-negative, this avoids the
possibility of an accidental infinite loop.
2026-01-05 15:03:04 -06:00
Mark Adler
570720b0c2
zlib 1.3.1.2
...
Interim version for an audit.
v1.3.1.2
2025-12-08 05:30:18 -08:00
Mark Adler
9aa11a7ed2
Avoid mixed signedness compare in gzwrite.c.
2025-12-08 04:46:23 -08:00
Mark Adler
66bdcdbe9d
Look for gcov in configure only if coverage was requested.
2025-12-08 04:22:31 -08:00
Vollstrecker
9cca2787ea
CMake: Repair macOS action.
2025-12-08 04:03:01 -08:00
Vollstrecker
3516e02f22
CMake: Repair Windows action.
2025-12-08 04:02:43 -08:00
Mark Adler
81cc0bebed
Support non-blocking devices in the gz* routines.
2025-12-08 03:52:25 -08:00
Mark Adler
598130fd07
Update gz*.c copyright dates.
2025-12-06 19:56:13 -08:00
Mark Adler
370ef1b41f
Return all available uncompressed data on error in gzread.c.
...
The error is recorded, and will be detected by the application
after all of the uncompressed data has been consumed and then one
more call is made to read data. The error is available immediately
from gzerror() if the application would like to know earlier.
2025-12-06 19:56:13 -08:00
Mark Adler
562b823635
Fix indentation in gzread.c.
2025-12-06 17:39:45 -08:00