History log of /openbsd-current/lib/libz/inflate.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.18 18-Nov-2023 tb

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%.

https://github.com/madler/zlib/commit/ac8f12c97d1afd9bafa9c710f827d40a407d3266

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

https://github.com/madler/zlib/commit/5af7cef45eeef86ddf6ab00b4e363c1eecaf47b6


Revision tags: OPENBSD_7_4_BASE
# 1.17 25-Apr-2023 tb

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


Revision tags: OPENBSD_7_3_BASE
# 1.16 23-Oct-2022 tb

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


# 1.15 20-Oct-2022 tb

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.


Revision tags: OPENBSD_7_2_BASE
# 1.14 15-Aug-2022 tb

Adjust whitespace (tabs vs spaces) on one line to reduce diff with upstream


# 1.13 09-Aug-2022 tb

Fix buffer overflow in inflateGetHeader()

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


# 1.12 08-May-2022 tb

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.


Revision tags: OPENBSD_7_0_BASE OPENBSD_7_1_BASE
# 1.11 04-Jul-2021 tb

branches: 1.11.2; 1.11.4;
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


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.10 01-Jun-2019 jca

Fix warnings when building zlib with ZLIB_CONST defined

Probably not very useful (given the lack of feedback) but feels more
correct. Kernel part tested with option ZLIB_CONST.


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.9 20-Jul-2005 millert

Update to zlib 1.2.3; OK deraadt@


Revision tags: OPENBSD_3_7_BASE
# 1.8 03-Dec-2004 djm

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


Revision tags: OPENBSD_3_6_BASE
# 1.7 26-Aug-2004 otto

Fix for DoS caused by incorrect error handling. From Dmitry V. Levin.
ok miller@ henning@


Revision tags: OPENBSD_3_5_BASE
# 1.6 17-Dec-2003 millert

branches: 1.6.2;
sync with sys/lib/libz; adds #ifdef SMALL and one more #ifndef SLOW
henning@ OK


# 1.5 17-Dec-2003 henning

#ifndef SLOW for consistency with sys/lib/libz/, not used for now;
millert@ agrees


# 1.4 16-Dec-2003 henning

update to zlib 1.2.1

ok millert@ deraadt@


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE
# 1.3 12-Mar-2002 millert

Update to zlib-1.1.4


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.2 08-Aug-1998 millert

branches: 1.2.14;
zlib 1.1.3


Revision tags: OPENBSD_2_0_BASE OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE
# 1.1 27-Jul-1996 tholo

Integrate zlib v1.0.3


# 1.17 25-Apr-2023 tb

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


Revision tags: OPENBSD_7_3_BASE
# 1.16 23-Oct-2022 tb

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


# 1.15 20-Oct-2022 tb

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.


Revision tags: OPENBSD_7_2_BASE
# 1.14 15-Aug-2022 tb

Adjust whitespace (tabs vs spaces) on one line to reduce diff with upstream


# 1.13 09-Aug-2022 tb

Fix buffer overflow in inflateGetHeader()

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


# 1.12 08-May-2022 tb

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.


Revision tags: OPENBSD_7_0_BASE OPENBSD_7_1_BASE
# 1.11 04-Jul-2021 tb

branches: 1.11.2; 1.11.4;
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


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.10 01-Jun-2019 jca

Fix warnings when building zlib with ZLIB_CONST defined

Probably not very useful (given the lack of feedback) but feels more
correct. Kernel part tested with option ZLIB_CONST.


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.9 20-Jul-2005 millert

Update to zlib 1.2.3; OK deraadt@


Revision tags: OPENBSD_3_7_BASE
# 1.8 03-Dec-2004 djm

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


Revision tags: OPENBSD_3_6_BASE
# 1.7 26-Aug-2004 otto

Fix for DoS caused by incorrect error handling. From Dmitry V. Levin.
ok miller@ henning@


Revision tags: OPENBSD_3_5_BASE
# 1.6 17-Dec-2003 millert

branches: 1.6.2;
sync with sys/lib/libz; adds #ifdef SMALL and one more #ifndef SLOW
henning@ OK


# 1.5 17-Dec-2003 henning

#ifndef SLOW for consistency with sys/lib/libz/, not used for now;
millert@ agrees


# 1.4 16-Dec-2003 henning

update to zlib 1.2.1

ok millert@ deraadt@


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE
# 1.3 12-Mar-2002 millert

Update to zlib-1.1.4


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.2 08-Aug-1998 millert

branches: 1.2.14;
zlib 1.1.3


Revision tags: OPENBSD_2_0_BASE OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE
# 1.1 27-Jul-1996 tholo

Integrate zlib v1.0.3


# 1.16 23-Oct-2022 tb

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


# 1.15 20-Oct-2022 tb

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.


Revision tags: OPENBSD_7_2_BASE
# 1.14 15-Aug-2022 tb

Adjust whitespace (tabs vs spaces) on one line to reduce diff with upstream


# 1.13 09-Aug-2022 tb

Fix buffer overflow in inflateGetHeader()

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


# 1.12 08-May-2022 tb

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.


Revision tags: OPENBSD_7_0_BASE OPENBSD_7_1_BASE
# 1.11 04-Jul-2021 tb

branches: 1.11.2; 1.11.4;
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


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.10 01-Jun-2019 jca

Fix warnings when building zlib with ZLIB_CONST defined

Probably not very useful (given the lack of feedback) but feels more
correct. Kernel part tested with option ZLIB_CONST.


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.9 20-Jul-2005 millert

Update to zlib 1.2.3; OK deraadt@


Revision tags: OPENBSD_3_7_BASE
# 1.8 03-Dec-2004 djm

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


Revision tags: OPENBSD_3_6_BASE
# 1.7 26-Aug-2004 otto

Fix for DoS caused by incorrect error handling. From Dmitry V. Levin.
ok miller@ henning@


Revision tags: OPENBSD_3_5_BASE
# 1.6 17-Dec-2003 millert

branches: 1.6.2;
sync with sys/lib/libz; adds #ifdef SMALL and one more #ifndef SLOW
henning@ OK


# 1.5 17-Dec-2003 henning

#ifndef SLOW for consistency with sys/lib/libz/, not used for now;
millert@ agrees


# 1.4 16-Dec-2003 henning

update to zlib 1.2.1

ok millert@ deraadt@


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE
# 1.3 12-Mar-2002 millert

Update to zlib-1.1.4


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.2 08-Aug-1998 millert

branches: 1.2.14;
zlib 1.1.3


Revision tags: OPENBSD_2_0_BASE OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE
# 1.1 27-Jul-1996 tholo

Integrate zlib v1.0.3


# 1.15 20-Oct-2022 tb

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.


Revision tags: OPENBSD_7_2_BASE
# 1.14 15-Aug-2022 tb

Adjust whitespace (tabs vs spaces) on one line to reduce diff with upstream


# 1.13 09-Aug-2022 tb

Fix buffer overflow in inflateGetHeader()

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


# 1.12 08-May-2022 tb

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.


Revision tags: OPENBSD_7_0_BASE OPENBSD_7_1_BASE
# 1.11 04-Jul-2021 tb

branches: 1.11.2; 1.11.4;
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


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.10 01-Jun-2019 jca

Fix warnings when building zlib with ZLIB_CONST defined

Probably not very useful (given the lack of feedback) but feels more
correct. Kernel part tested with option ZLIB_CONST.


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.9 20-Jul-2005 millert

Update to zlib 1.2.3; OK deraadt@


Revision tags: OPENBSD_3_7_BASE
# 1.8 03-Dec-2004 djm

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


Revision tags: OPENBSD_3_6_BASE
# 1.7 26-Aug-2004 otto

Fix for DoS caused by incorrect error handling. From Dmitry V. Levin.
ok miller@ henning@


Revision tags: OPENBSD_3_5_BASE
# 1.6 17-Dec-2003 millert

branches: 1.6.2;
sync with sys/lib/libz; adds #ifdef SMALL and one more #ifndef SLOW
henning@ OK


# 1.5 17-Dec-2003 henning

#ifndef SLOW for consistency with sys/lib/libz/, not used for now;
millert@ agrees


# 1.4 16-Dec-2003 henning

update to zlib 1.2.1

ok millert@ deraadt@


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE
# 1.3 12-Mar-2002 millert

Update to zlib-1.1.4


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.2 08-Aug-1998 millert

branches: 1.2.14;
zlib 1.1.3


Revision tags: OPENBSD_2_0_BASE OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE
# 1.1 27-Jul-1996 tholo

Integrate zlib v1.0.3


# 1.14 15-Aug-2022 tb

Adjust whitespace (tabs vs spaces) on one line to reduce diff with upstream


# 1.13 09-Aug-2022 tb

Fix buffer overflow in inflateGetHeader()

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


# 1.12 08-May-2022 tb

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.


Revision tags: OPENBSD_7_0_BASE OPENBSD_7_1_BASE
# 1.11 04-Jul-2021 tb

branches: 1.11.2; 1.11.4;
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


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.10 01-Jun-2019 jca

Fix warnings when building zlib with ZLIB_CONST defined

Probably not very useful (given the lack of feedback) but feels more
correct. Kernel part tested with option ZLIB_CONST.


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.9 20-Jul-2005 millert

Update to zlib 1.2.3; OK deraadt@


Revision tags: OPENBSD_3_7_BASE
# 1.8 03-Dec-2004 djm

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


Revision tags: OPENBSD_3_6_BASE
# 1.7 26-Aug-2004 otto

Fix for DoS caused by incorrect error handling. From Dmitry V. Levin.
ok miller@ henning@


Revision tags: OPENBSD_3_5_BASE
# 1.6 17-Dec-2003 millert

branches: 1.6.2;
sync with sys/lib/libz; adds #ifdef SMALL and one more #ifndef SLOW
henning@ OK


# 1.5 17-Dec-2003 henning

#ifndef SLOW for consistency with sys/lib/libz/, not used for now;
millert@ agrees


# 1.4 16-Dec-2003 henning

update to zlib 1.2.1

ok millert@ deraadt@


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE
# 1.3 12-Mar-2002 millert

Update to zlib-1.1.4


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.2 08-Aug-1998 millert

branches: 1.2.14;
zlib 1.1.3


Revision tags: OPENBSD_2_0_BASE OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE
# 1.1 27-Jul-1996 tholo

Integrate zlib v1.0.3


# 1.13 09-Aug-2022 tb

Fix buffer overflow in inflateGetHeader()

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


# 1.12 08-May-2022 tb

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.


Revision tags: OPENBSD_7_0_BASE OPENBSD_7_1_BASE
# 1.11 04-Jul-2021 tb

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


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.10 01-Jun-2019 jca

Fix warnings when building zlib with ZLIB_CONST defined

Probably not very useful (given the lack of feedback) but feels more
correct. Kernel part tested with option ZLIB_CONST.


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.9 20-Jul-2005 millert

Update to zlib 1.2.3; OK deraadt@


Revision tags: OPENBSD_3_7_BASE
# 1.8 03-Dec-2004 djm

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


Revision tags: OPENBSD_3_6_BASE
# 1.7 26-Aug-2004 otto

Fix for DoS caused by incorrect error handling. From Dmitry V. Levin.
ok miller@ henning@


Revision tags: OPENBSD_3_5_BASE
# 1.6 17-Dec-2003 millert

branches: 1.6.2;
sync with sys/lib/libz; adds #ifdef SMALL and one more #ifndef SLOW
henning@ OK


# 1.5 17-Dec-2003 henning

#ifndef SLOW for consistency with sys/lib/libz/, not used for now;
millert@ agrees


# 1.4 16-Dec-2003 henning

update to zlib 1.2.1

ok millert@ deraadt@


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE
# 1.3 12-Mar-2002 millert

Update to zlib-1.1.4


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.2 08-Aug-1998 millert

branches: 1.2.14;
zlib 1.1.3


Revision tags: OPENBSD_2_0_BASE OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE
# 1.1 27-Jul-1996 tholo

Integrate zlib v1.0.3


# 1.12 08-May-2022 tb

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.


Revision tags: OPENBSD_7_0_BASE OPENBSD_7_1_BASE
# 1.11 04-Jul-2021 tb

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


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.10 01-Jun-2019 jca

Fix warnings when building zlib with ZLIB_CONST defined

Probably not very useful (given the lack of feedback) but feels more
correct. Kernel part tested with option ZLIB_CONST.


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.9 20-Jul-2005 millert

Update to zlib 1.2.3; OK deraadt@


Revision tags: OPENBSD_3_7_BASE
# 1.8 03-Dec-2004 djm

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


Revision tags: OPENBSD_3_6_BASE
# 1.7 26-Aug-2004 otto

Fix for DoS caused by incorrect error handling. From Dmitry V. Levin.
ok miller@ henning@


Revision tags: OPENBSD_3_5_BASE
# 1.6 17-Dec-2003 millert

branches: 1.6.2;
sync with sys/lib/libz; adds #ifdef SMALL and one more #ifndef SLOW
henning@ OK


# 1.5 17-Dec-2003 henning

#ifndef SLOW for consistency with sys/lib/libz/, not used for now;
millert@ agrees


# 1.4 16-Dec-2003 henning

update to zlib 1.2.1

ok millert@ deraadt@


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE
# 1.3 12-Mar-2002 millert

Update to zlib-1.1.4


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.2 08-Aug-1998 millert

branches: 1.2.14;
zlib 1.1.3


Revision tags: OPENBSD_2_0_BASE OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE
# 1.1 27-Jul-1996 tholo

Integrate zlib v1.0.3


# 1.11 04-Jul-2021 tb

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


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.10 01-Jun-2019 jca

Fix warnings when building zlib with ZLIB_CONST defined

Probably not very useful (given the lack of feedback) but feels more
correct. Kernel part tested with option ZLIB_CONST.


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.9 20-Jul-2005 millert

Update to zlib 1.2.3; OK deraadt@


Revision tags: OPENBSD_3_7_BASE
# 1.8 03-Dec-2004 djm

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


Revision tags: OPENBSD_3_6_BASE
# 1.7 26-Aug-2004 otto

Fix for DoS caused by incorrect error handling. From Dmitry V. Levin.
ok miller@ henning@


Revision tags: OPENBSD_3_5_BASE
# 1.6 17-Dec-2003 millert

branches: 1.6.2;
sync with sys/lib/libz; adds #ifdef SMALL and one more #ifndef SLOW
henning@ OK


# 1.5 17-Dec-2003 henning

#ifndef SLOW for consistency with sys/lib/libz/, not used for now;
millert@ agrees


# 1.4 16-Dec-2003 henning

update to zlib 1.2.1

ok millert@ deraadt@


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE
# 1.3 12-Mar-2002 millert

Update to zlib-1.1.4


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.2 08-Aug-1998 millert

branches: 1.2.14;
zlib 1.1.3


Revision tags: OPENBSD_2_0_BASE OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE
# 1.1 27-Jul-1996 tholo

Integrate zlib v1.0.3


# 1.10 01-Jun-2019 jca

Fix warnings when building zlib with ZLIB_CONST defined

Probably not very useful (given the lack of feedback) but feels more
correct. Kernel part tested with option ZLIB_CONST.


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.9 20-Jul-2005 millert

Update to zlib 1.2.3; OK deraadt@


Revision tags: OPENBSD_3_7_BASE
# 1.8 03-Dec-2004 djm

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


Revision tags: OPENBSD_3_6_BASE
# 1.7 26-Aug-2004 otto

Fix for DoS caused by incorrect error handling. From Dmitry V. Levin.
ok miller@ henning@


Revision tags: OPENBSD_3_5_BASE
# 1.6 17-Dec-2003 millert

branches: 1.6.2;
sync with sys/lib/libz; adds #ifdef SMALL and one more #ifndef SLOW
henning@ OK


# 1.5 17-Dec-2003 henning

#ifndef SLOW for consistency with sys/lib/libz/, not used for now;
millert@ agrees


# 1.4 16-Dec-2003 henning

update to zlib 1.2.1

ok millert@ deraadt@


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE
# 1.3 12-Mar-2002 millert

Update to zlib-1.1.4


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.2 08-Aug-1998 millert

branches: 1.2.14;
zlib 1.1.3


Revision tags: OPENBSD_2_0_BASE OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE
# 1.1 27-Jul-1996 tholo

Integrate zlib v1.0.3


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.9 20-Jul-2005 millert

Update to zlib 1.2.3; OK deraadt@


Revision tags: OPENBSD_3_7_BASE
# 1.8 03-Dec-2004 djm

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


Revision tags: OPENBSD_3_6_BASE
# 1.7 26-Aug-2004 otto

Fix for DoS caused by incorrect error handling. From Dmitry V. Levin.
ok miller@ henning@


Revision tags: OPENBSD_3_5_BASE
# 1.6 17-Dec-2003 millert

branches: 1.6.2;
sync with sys/lib/libz; adds #ifdef SMALL and one more #ifndef SLOW
henning@ OK


# 1.5 17-Dec-2003 henning

#ifndef SLOW for consistency with sys/lib/libz/, not used for now;
millert@ agrees


# 1.4 16-Dec-2003 henning

update to zlib 1.2.1

ok millert@ deraadt@


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE
# 1.3 12-Mar-2002 millert

Update to zlib-1.1.4


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.2 08-Aug-1998 millert

branches: 1.2.14;
zlib 1.1.3


Revision tags: OPENBSD_2_0_BASE OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE
# 1.1 27-Jul-1996 tholo

Integrate zlib v1.0.3