1
0
mirror of https://github.com/openbsd/src.git synced 2024-12-22 16:42:56 -08:00
Commit Graph

19 Commits

Author SHA1 Message Date
tb
a225ed8233 sync with upstream
This adds a new public API, deflateUsed(), so is technically a minor bump.
Nothing will be using this anytime soon, so no shared library bump.

discussed with deraadt during c2k24
2024-08-01 04:02:26 +00:00
tb
d5e7bdb5d2 Update to zlib 1.3.1
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-23 14:46:27 +00:00
tb
f5252e2d83 libz: sync with upstream's develop branch as of Jan 18 2024-01-21 07:34:39 +00:00
tb
62a6fda735 libz sync with develop branch, discussed with deraadt
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%.

ac8f12c97d

Fix bug in inflateSync() for data held in bit buffer.

5af7cef45e
2023-11-18 22:43:25 +00:00
tb
a04ea15daf Update libz to the HEAD of the develop branch
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
2023-04-25 16:59:10 +00:00
tb
46c3d7fc63 Drop RCS ids in upstream zlib source
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-23 06:00:23 +00:00
tb
8bda5813ab Update base libz to 1.2.13
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-10-20 15:35:31 +00:00
tb
703d492421 Update to zlib 1.2.12
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-05-08 14:04:21 +00:00
tb
f0c342b35d Fix memory corruption bug in zlib
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.

5c44459c3b
2022-03-25 10:54:27 +00:00
tb
983388f585 Add missing RCS tags 2021-07-04 17:41:23 +00:00
tb
36f395ce93 Update libz to zlib 1.2.11 and reapply local patches as far as this
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
2021-07-04 14:24:49 +00:00
martynas
af52927a89 typos; ok jmc@
sys/netinet/in_pcb.c and sys/net/bridgestp.c ok henning@
sys/dev/pci/bktr/* ok jakemsr@
2007-11-26 09:28:33 +00:00
millert
d76b9bfa90 Update to zlib 1.2.3; OK deraadt@ 2005-07-20 15:56:40 +00:00
djm
b967fc3596 update to zlib-1.21 (we already have the CAN-2004-0797 security fixes)
"in it goes" deraadt@, in the near-total absence of feedback from others
2004-12-03 03:06:36 +00:00
henning
85c48e7957 update to zlib 1.2.1
ok millert@ deraadt@
2003-12-16 22:33:02 +00:00
millert
1a16713602 Update to zlib-1.1.4 2002-03-12 00:25:57 +00:00
todd
dd4317adfa $OpenBSD$ 2000-03-02 00:29:47 +00:00
millert
15ce079619 zlib 1.1.3 1998-08-08 20:57:04 +00:00
tholo
2af503bc86 Integrate zlib v1.0.3 1996-07-27 02:39:40 +00:00