aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Correct macro name for ZLIB_INSECURE in c-std.yml.HEADdevelopMark Adler20 hours1-3/+3
|
* Add compiler options to standards in c-std.yml for ZLIB_INSECURE.Mark Adler20 hours1-6/+3
|
* Add definition of ZLIB_INSECURE to build tests with c89 and c94.Mark Adler21 hours1-0/+6
|
* Avoid Visual C warning in gzread.c.Mark Adler42 hours1-1/+1
|
* Fix links to Mark Nelson's zlib article, now hosted on zlib.net.Mark Adler42 hours4-3/+3
|
* Use atomics to build inflate fixed tables once.Mark Adler42 hours13-345/+309
| | | | | | | | | | | | 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.
* Add compressBound_z and deflateBound_z functions for large values.Mark Adler42 hours15-15/+89
| | | | | | | 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.
* Prevent the use of insecure functions without an explicit request.Mark Adler42 hours5-42/+95
| | | | | | | | | | | 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.
* Update the link for an snprintf/vsnprintf implementation in FAQ.Mark Adler42 hours1-2/+2
| | | | | | | 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.
* Copy only the initialized window contents in inflateCopy.Mark Adler42 hours1-5/+2
| | | | | To avoid the propagation and possible disclosure of uninitialized memory contents.
* Check for negative lengths in crc32_combine functions.Mark Adler42 hours2-2/+6
| | | | | Though zlib.h says that len2 must be non-negative, this avoids the possibility of an accidental infinite loop.
* zlib 1.3.1.2v1.3.1.2Mark Adler2025-12-0840-80/+103
| | | | Interim version for an audit.
* Avoid mixed signedness compare in gzwrite.c.Mark Adler2025-12-081-1/+1
|
* Look for gcov in configure only if coverage was requested.Mark Adler2025-12-081-24/+26
|
* CMake: Repair macOS action.Vollstrecker2025-12-082-4/+28
|
* CMake: Repair Windows action.Vollstrecker2025-12-081-1/+1
|
* Support non-blocking devices in the gz* routines.Mark Adler2025-12-085-116/+276
|
* Update gz*.c copyright dates.Mark Adler2025-12-064-4/+4
|
* Return all available uncompressed data on error in gzread.c.Mark Adler2025-12-063-32/+49
| | | | | | | 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.
* Fix indentation in gzread.c.Mark Adler2025-12-061-3/+3
|
* Update links to the RFCs.Mark Adler2025-12-065-11/+11
|
* CMake: Fix typos in test/CMakeLists.txt.Vollstrecker2025-12-061-2/+2
|
* Clarify the use of inflateGetHeader().Mark Adler2025-12-061-14/+16
|
* Remove redundant frees of point list on error in examples/zran.c.Mark Adler2025-12-062-21/+17
| | | | | Also clean out the point list contents when freed, even though the structure itself is freed, in case someone tries to free it again.
* Allow gzflush() to write empty gzip members.Mark Adler2025-12-061-2/+3
| | | | | Before this, a gzflush() with Z_FINISH and no data to write would do nothing. Now it will write an empty gzip member.
* Improve the discrimination between trailing garbage and bad gzip.Mark Adler2025-12-063-30/+37
| | | | | | | | This proceeds to try to decode whatever follows the last gzip member, and concludes that it is acceptable trailing garbage only if it results in a data error without decompressing any data. This commit also reduces the probability of a false-positive gzip header detection.
* Add a "G" option to force gzip, disabling transparency in gzread().Mark Adler2025-12-063-5/+31
| | | | | If the input is not a gzip stream with this option, an error will be returned.
* Fix bug in inflatePrime() for 16-bit ints.Mark Adler2025-05-132-10/+21
| | | | | | Also elaborate on the inflatePrime() error return in zlib.h, and assure that data_type is correct after initialization and a Z_NEED_DICT return.
* Correct Visual Studio readme.txt.skydvr2025-05-131-2/+2
|
* Constrain line lengths in inflate code.Mark Adler2025-05-133-12/+22
|
* Note the use of gzungetc() to run a deferred seek while reading.Mark Adler2025-05-131-0/+5
|
* Note that gzseek() requests are deferred until the next operation.Mark Adler2025-05-131-1/+2
|
* Clarify the use of errnum in gzerror().Mark Adler2025-02-251-3/+4
|
* Have gz_skip() update how far it got for later continuation.Mark Adler2025-02-254-76/+46
| | | | This also simplifies seek processing in general.
* Avoid a fruitless memory copy in gzread.c.Mark Adler2025-02-231-4/+6
|
* Remove some unsightly spaces in zlib.h.Mark Adler2025-02-211-3/+3
|
* Use generated zconf.h in cmake build.Vollstrecker2025-02-183-7/+14
| | | | | This restores the inclusion of the local zconf.h (double quoted) in normal usage.
* Check that HAVE_UNISTD_H and HAVE_STDARG_H are not defined as 0.Mark Adler2025-02-133-6/+6
|
* Do not look for zconf.h in the source directory.Vollstrecker2025-02-131-1/+1
| | | | | Temporary patch for cmake, but too violent. A better solution will need to be found.
* Use zconf.h instead of zconf.h.in for cmake.Mark Adler2025-02-061-2/+2
|
* Repair MinGW cmake build.Vollstrecker2025-02-063-10/+2
|
* Fix Ada bindings on x64.spectralio2025-02-051-1/+2
|
* Restore zconf.h to distribution.Mark Adler2025-02-053-5/+551
|
* Revert previous commit, restoring the memcpy() call.Mark Adler2025-02-021-3/+3
| | | | | The reported issue was due to an error in their test code, not in inflate. This use of memcpy() in inflate is correct.
* Avoid use of memcpy() in inflate when areas can overlap.Mark Adler2025-02-011-3/+3
|
* Update Makefile to not recreate zconf.h and zconf.h.cmakein.Mark Adler2025-01-312-11/+12
| | | | | Both were removed as zconf.h.cmakein is no longer needed, and zconf.h is made from zconf.h.in.
* CMake: Make USE_FILE32API part of the interface.Vollstrecker2025-01-311-12/+8
|
* CMake: Give minizip a suffix on Cygwin as well.Vollstrecker2025-01-312-3/+4
|
* CMake: Disable minizip on Cygwin.Vollstrecker2025-01-311-2/+1
|
* CMake: Correct workflow line continuation.Vollstrecker2025-01-311-1/+1
|