summaryrefslogtreecommitdiff
path: root/lib/libz
AgeCommit message (Collapse)Author
2024-05-28remove outdated zlib version informationTheo Buehler
from jan stary fine with jmc
2024-03-27zlib: sync with upstreamTheo Buehler
The change in zconf.h only affects mingw; The change in inflate.h updates a comment
2024-03-15zlib: sync with upstreamTheo Buehler
More Windows #ifdef shuffling. Only one change relevant for OpenBSD: Make deflateBound() more conservative and handle Z_STREAM_END.
2024-02-13Pull in z_off64_t handling from upstreamTheo Buehler
Since we don't define Z_LARGE64, we continue to define z_off64_t to z_off_t and all the other changes are no-ops for OpenBSD. ok kettenis millert
2024-02-11libz: more windows ifdef turd shining from upstreamTheo Buehler
2024-02-10libz: sync with upstreamTheo Buehler
- fix type of local variable in deflate_stored() - more Windows compat shuffling - wrap overlong line in gzread
2024-02-09pull in another upstream tweak for windowsTheo Buehler
2024-02-09zlib: sync with upstreamTheo Buehler
2024-02-07sync with upstreamTheo Buehler
2024-02-07sync with zlib.hTheo Buehler
ok jmc
2024-02-07Sync doc-comment for deflateInit2 with upstreamTheo Buehler
2024-01-28Pull in some post 1.3.1 upstream commitsTheo Buehler
This is only cosmetic as far as OpenBSD is concerned.
2024-01-23Update to zlib 1.3.1Theo Buehler
Since we already pulled in all fixes, this only bumps version/magic numbers and copyright years. The fixes relevant to OpenBSD are: - Fix bug in inflateSync() for data held in bit buffer - Add LIT_MEM define to use more memory for a small deflate speedup - Add bounds checking to ERR_MSG() macro, used by zError() - Various portability and appearance improvements
2024-01-21Sync with upstream as of Jan 20Theo Buehler
No change of compiled code: the bug fix in check_match() affects ZLIB_DEBUG builds only and the Z_ARG macro is unused.
2024-01-21libz: sync with upstream's develop branch as of Jan 18Theo Buehler
2024-01-21Define HAVE_HIDDEN for libzTheo Buehler
This adds the hidden visibility attribute to functions that are needed in multiple source files of the library but not part of the public API. This is technically a major bump, but that decided to be overkill. discussed with deraadt and millert
2024-01-20Merge docs of crc32_combine_{gen,op} from zlib.hTheo Buehler
Also add two 'len2 must be non-negative.' from upstream looks good to jmc
2023-11-18libz sync with develop branch, discussed with deraadtTheo Buehler
Apart from cosmetics, this includes the following commits: Add LIT_MEM define to use more memory for a small deflate speedup. A bug fix in zlib 1.2.12 resulted in a slight slowdown (1-2%) of deflate. This commit provides the option to #define LIT_MEM, which uses more memory to reverse most of that slowdown. The memory for the pending buffer and symbol buffers is increased by 25%, which increases the total memory usage with the default parameters by about 6%. https://github.com/madler/zlib/commit/ac8f12c97d1afd9bafa9c710f827d40a407d3266 Fix bug in inflateSync() for data held in bit buffer. https://github.com/madler/zlib/commit/5af7cef45eeef86ddf6ab00b4e363c1eecaf47b6
2023-08-20Bump zlib version to 1.3Theo Buehler
We have been pulling in all actual changes over the past months, so this is only a version number bump. The relevant entries of the ChangeLog are: * Building using K&R (pre-ANSI) function definitions is no longer supported. * Fixed a bug in deflateBound() for level 0 and memLevel 9. * Fixed a bug when gzungetc() is used immediately after gzopen(). * Fixed a bug when using gzflush() with a very small buffer. * Fixed a crash when gzsetparams() is attempted for a transparent write. ok deraadt miod millert
2023-08-18sync with zlib.hTheo Buehler
"that's fine" jmc
2023-08-18Sync doc comment with upstreamTheo Buehler
2023-08-15Fix bug when using gzflush() with a very small buffer.Theo Buehler
from upstream
2023-08-13Conditionally disable MSANTheo Buehler
from upstream
2023-08-12Fix bug when gzungetc() is used immediately after gzopen().Theo Buehler
from upstream
2023-08-12fix typoTheo Buehler
from upstream
2023-08-04Fix a couple of typos in a commentTheo Buehler
from upstream
2023-07-30sync compress.3 with zlib.hTheo Buehler
ok jmc
2023-07-30Merge some doc comment updates from upstreamTheo Buehler
2023-07-30Pull in two #undef from upstream's develop branchTheo Buehler
ok guenther
2023-05-02Sync with upstreamTheo Buehler
Update some links in the README, remove a duplicate word in a zlib.h doc comment. The only code change is guarded by #if defined(_WIN32).
2023-04-25Update libz to the HEAD of the develop branchTheo Buehler
This mostly moves from K&R prototypes to ANSI prototypes and includes a handful of bug fixes that are nice to have. The corresponding sys commit will allow us to undo some hacks that jca applied to make the kernel build with clang 15. discussed with deraadt
2022-12-27Revert spelling fixes. Please report them upstream.Theo Buehler
2022-12-27spelling fixes; from paul tagliamonteJason McIntyre
any changes not taken noted on tech, but chiefly here i did not take the cancelation - cancellation changes;
2022-10-23Drop RCS ids in upstream zlib sourceTheo Buehler
We're not maintaining a this as a fork, it's upstream source with a handful of patches. Thus, the RCS ids aren't particularly useful or important. They are a bit of a maintenance burden and generate noise in diffs. ok kn, no objection millert, "kill" guess who
2022-10-20Update base libz to 1.2.13Theo Buehler
This update contains a few bugfixes (some of which we have already backported to 1.2.12) and a ton of cosmetic changes. The relevant bits of the ChangeLog are: - Repair prototypes and exporting of new CRC functions - Have infback() deliver all of the available output up to any error - Fix a bug when getting a gzip header extra field with inflate() - Fix bug in block type selection when Z_FIXED used - Tighten deflateBound bounds - Remove deleted assembler code references - Various portability and appearance improvements Tested on amd64 and arm64 by me and on sparc64 by kn.
2022-08-15Adjust whitespace (tabs vs spaces) on one line to reduce diff with upstreamTheo Buehler
2022-08-09Fix buffer overflow in inflateGetHeader()Theo Buehler
This is the initial fix combined with a fix for a NULL deref introduced in the initial fix. ok millert, help from tj commit eff308af425b67093bab25f80f1ae950166bece1 Author: Mark Adler <fork@madler.net> Date: Sat Jul 30 15:51:11 2022 -0700 Fix a bug when getting a gzip header extra field with inflate(). If the extra field was larger than the space the user provided with inflateGetHeader(), and if multiple calls of inflate() delivered the extra header data, then there could be a buffer overflow of the provided space. This commit assures that provided space is not exceeded. https://github.com/madler/zlib/commit/eff308af425b67093bab25f80f1ae950166bece1 commit 1eb7682f845ac9e9bf9ae35bbfb3bad5dacbd91d (HEAD -> develop, origin/develop) Author: Mark Adler <fork@madler.net> Date: Mon Aug 8 10:50:09 2022 -0700 Fix extra field processing bug that dereferences NULL state->head. The recent commit to fix a gzip header extra field processing bug introduced the new bug fixed here. https://github.com/madler/zlib/commit/1eb7682f845ac9e9bf9ae35bbfb3bad5dacbd91d
2022-07-20bump major due to struct size change on ILP32 architecturesTheo Buehler
2022-07-20Revert zlib.h r1.7Theo Buehler
The change from uLong to z_off_t was made due to a bug in gzip(1) which was fixed by gkoehler in gzopen.c r1.35. The trouble with the z_off_t change is that it is an ABI break and that it does not play well with various ffi interfaces. For example, Perl and Rust break on ILP32 arches with the system zlib. Run through an i386 bulk by sthen and an i386 regress by bluhm, thanks. ok bluhm
2022-05-08Bump minor after symbol additionTheo Buehler
2022-05-08Backport an upstream fix for CRC calculation. This fixes Java applicationsTheo Buehler
on some older hardware, see https://github.com/madler/zlib/issues/613 Pointed out by tj and sthen commit ec3df00224d4b396e2ac6586ab5d25f673caa4c2 Author: Mark Adler <madler@alumni.caltech.edu> Date: Wed Mar 30 11:14:53 2022 -0700 Correct incorrect inputs provided to the CRC functions. The previous releases of zlib were not sensitive to incorrect CRC inputs with bits set above the low 32. This commit restores that behavior, so that applications with such bugs will continue to operate as before.
2022-05-08Update to zlib 1.2.12Theo Buehler
Build tests by myself for amd64 and arm64, sthen and inoguchi for i386 and gkoehler for macppc and powerpc64, thanks! Detailed changelog is part of the committed diff.
2022-03-25Improve error checking in deflatePrime()Theo Buehler
This is a small follow-up commit to the previous commit. ok mbuhl millert commit 4346a16853e19b45787ce933666026903fb8f3f8 Author: Mark Adler <madler@alumni.caltech.edu> Date: Tue Apr 17 22:44:41 2018 -0700 Assure that the number of bits for deflatePrime() is valid. https://github.com/madler/zlib/commit/4346a16853e19b45787ce933666026903fb8f3f8
2022-03-25Fix memory corruption bug in zlibTheo Buehler
zlib has a crashing bug. The bug fix has been sitting in the unreleased develop branch for nearly four years. Pull in this fix. ok mbuhl millert Reported by Tavis Ormandy on oss-security: https://marc.info/?l=oss-security&m=164809382107156&w=2 commit 5c44459c3b28a9bd3283aaceab7c615f8020c531 Author: Mark Adler <madler@alumni.caltech.edu> Date: Tue Apr 17 22:09:22 2018 -0700 Fix a bug that can crash deflate on some input when using Z_FIXED. This bug was reported by Danilo Ramos of Eideticom, Inc. It has lain in wait 13 years before being found! The bug was introduced in zlib 1.2.2.2, with the addition of the Z_FIXED option. That option forces the use of fixed Huffman codes. For rare inputs with a large number of distant matches, the pending buffer into which the compressed data is written can overwrite the distance symbol table which it overlays. That results in corrupted output due to invalid distances, and can result in out-of-bound accesses, crashing the application. The fix here combines the distance buffer and literal/length buffers into a single symbol buffer. Now three bytes of pending buffer space are opened up for each literal or length/distance pair consumed, instead of the previous two bytes. This assures that the pending buffer cannot overwrite the symbol table, since the maximum fixed code compressed length/distance is 31 bits, and since there are four bytes of pending space for every three bytes of symbol space. https://github.com/madler/zlib/commit/5c44459c3b28a9bd3283aaceab7c615f8020c531
2022-03-24Backport zlib fix for the multi line CLEAR_HASH macro. There isAlexander Bluhm
an else branch where only half of the macro is executed conditionally. Acording to upstream comment this has only little impact. https://github.com/madler/zlib/commit/38e8ce32afbaa82f67d992b9f3056f281fe69259 OK deraadt@ tb@
2021-12-11two more "the the" fixes;Jason McIntyre
2021-07-06sync man page with changes 1.2.3 -> 1.2.11. some changes:Jason McIntyre
- update references version number - Z_NULL -> NULL; from millert - terminate function synopses in main body with ";"; from tb - NULL -> NUL; from tb - update NAME and SYNOPSIS for added functions - updated copyright, to match zlib.h - simplify \-1 -> -1 ok tb
2021-07-04Add missing RCS tagsTheo Buehler
2021-07-04bump major after zlib updateTheo Buehler
2021-07-04Update libz to zlib 1.2.11 and reapply local patches as far as thisTheo Buehler
made sense. Tested in snaps for a few days. deraadt helped with fitting things on floppies and jmatthew found a bug I introduced. ok deraadt