From 9e35567064baded660f61732b247ef5abc809014 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Tue, 17 Feb 2026 02:31:51 -0800 Subject: Version 1.3.2 --- CMakeLists.txt | 2 +- ChangeLog | 25 +++++++++++++ LICENSE | 2 +- Makefile.in | 4 +-- README | 6 ++-- compress.c | 2 +- contrib/delphi/ZLib.pas | 2 +- contrib/dotzlib/DotZLib/UnitTests.cs | 2 +- contrib/infback9/inftree9.c | 6 ++-- contrib/minizip/MiniZip64_info.txt | 2 +- contrib/minizip/configure.ac | 2 +- contrib/minizip/crypt.h | 5 +-- contrib/minizip/ioapi.c | 2 +- contrib/minizip/ioapi.h | 2 +- contrib/minizip/iowin32.c | 3 +- contrib/minizip/iowin32.h | 3 +- contrib/minizip/miniunz.c | 3 +- contrib/minizip/minizip.c | 3 +- contrib/minizip/skipset.h | 2 +- contrib/minizip/unzip.c | 3 +- contrib/minizip/unzip.h | 3 +- contrib/minizip/zip.c | 3 +- contrib/minizip/zip.h | 3 +- contrib/nuget/nuget.csproj | 4 +-- contrib/pascal/zlibpas.pas | 2 +- contrib/puff/pufftest.c | 3 +- contrib/zlib1-dll/CMakeLists.txt | 2 +- crc32.c | 2 +- deflate.c | 4 +-- deflate.h | 2 +- gzguts.h | 2 +- gzlib.c | 2 +- gzread.c | 2 +- gzwrite.c | 2 +- infback.c | 2 +- inffast.c | 2 +- inflate.c | 2 +- inftrees.c | 6 ++-- inftrees.h | 2 +- os400/README400 | 2 +- os400/make.sh | 2 +- os400/zlibfixed.rpgle | 24 ++++++++++--- os400/zlibfree.rpgle | 66 +++++++++++++++++++++++++++++++---- qnx/package.qpg | 10 +++--- test/example.c | 2 +- test/minigzip.c | 2 +- treebuild.xml | 4 +-- trees.c | 2 +- uncompr.c | 2 +- win32/Makefile.gcc | 2 +- win32/README-WIN32.txt | 6 ++-- win32/zlib1.rc | 2 +- zconf.h | 2 +- zconf.h.in | 2 +- zlib.3 | 6 ++-- zlib.3.pdf | Bin 28251 -> 28222 bytes zlib.h | 12 +++---- zlib.map | 2 +- zutil.c | 2 +- zutil.h | 2 +- 60 files changed, 182 insertions(+), 103 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 71615168..e103c409 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.12...3.31) project( zlib LANGUAGES C - VERSION 1.3.1.2 + VERSION 1.3.2 HOMEPAGE_URL "https://zlib.net/" DESCRIPTION "a general-purpose lossless data-compression library") diff --git a/ChangeLog b/ChangeLog index 0571d81b..312753ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,31 @@ ChangeLog file for zlib +Changes in 1.3.2 (17 Feb 2026) +- Continued rewrite of CMake build [Vollstrecker] +- Various portability improvements +- Various github workflow additions and improvements +- Check for negative lengths in crc32_combine functions +- Copy only the initialized window contents in inflateCopy +- Prevent the use of insecure functions without an explicit request +- Add compressBound_z and deflateBound_z functions for large values +- Use atomics to build inflate fixed tables once +- Add definition of ZLIB_INSECURE to build tests with c89 and c94 +- Add --undefined option to ./configure for UBSan checker +- Copy only the initialized deflate state in deflateCopy +- Zero inflate state on allocation +- Remove untgz from contrib +- Add _z versions of the compress and uncompress functions +- Vectorize the CRC-32 calculation on the s390x +- Set bit 11 of the zip header flags in minizip if UTF-8 +- Update OS/400 support +- Add a test to configure to check for a working compiler +- Check for invalid NULL pointer inputs to zlib operations +- Add --mandir to ./configure to specify manual directory +- Add LICENSE.Info-Zip to contrib/minizip +- Remove vstudio projects in lieu of cmake-generated projects +- Replace strcpy() with memcpy() in contrib/minizip + Changes in 1.3.1.2 (8 Dec 2025) - Improve portability to RISC OS - Permit compiling contrib/minizip/unzip.c with decryption diff --git a/LICENSE b/LICENSE index 61229c39..b7a69d05 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ Copyright notice: - (C) 1995-2025 Jean-loup Gailly and Mark Adler + (C) 1995-2026 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Makefile.in b/Makefile.in index d1f0b8ea..bee83edf 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,5 +1,5 @@ # Makefile for zlib -# Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler +# Copyright (C) 1995-2026 Jean-loup Gailly, Mark Adler # For conditions of distribution and use, see copyright notice in zlib.h # To compile and test, type: @@ -31,7 +31,7 @@ VGFMAFLAG= STATICLIB=libz.a SHAREDLIB=libz.so -SHAREDLIBV=libz.so.1.3.1.2 +SHAREDLIBV=libz.so.1.3.2 SHAREDLIBM=libz.so.1 LIBS=$(STATICLIB) $(SHAREDLIBV) diff --git a/README b/README index 4723b8ef..2b1e6f36 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ ZLIB DATA COMPRESSION LIBRARY -zlib 1.3.1.2 is a general purpose data compression library. All the code is +zlib 1.3.2 is a general purpose data compression library. All the code is thread safe (though see the FAQ for caveats). The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 at https://datatracker.ietf.org/doc/html/rfc1950 (zlib format), rfc1951 (deflate @@ -31,7 +31,7 @@ Mark Nelson wrote an article about zlib for the Jan. 1997 issue of Dr. Dobb's Journal; a copy of the article is available at https://zlib.net/nelson/ . -The changes made in version 1.3.1.2 are documented in the file ChangeLog. +The changes made in version 1.3.2 are documented in the file ChangeLog. Unsupported third party contributions are provided in directory contrib/ . @@ -81,7 +81,7 @@ Acknowledgments: Copyright notice: - (C) 1995-2025 Jean-loup Gailly and Mark Adler + (C) 1995-2026 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/compress.c b/compress.c index 410d6e50..bd74b948 100644 --- a/compress.c +++ b/compress.c @@ -1,5 +1,5 @@ /* compress.c -- compress a memory buffer - * Copyright (C) 1995-2005, 2014, 2016 Jean-loup Gailly, Mark Adler + * Copyright (C) 1995-2026 Jean-loup Gailly, Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ diff --git a/contrib/delphi/ZLib.pas b/contrib/delphi/ZLib.pas index b167b69c..cda3b09e 100644 --- a/contrib/delphi/ZLib.pas +++ b/contrib/delphi/ZLib.pas @@ -152,7 +152,7 @@ procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer; const OutBuf: Pointer; BufSize: Integer); const - zlib_version = '1.3.1.2'; + zlib_version = '1.3.2'; type EZlibError = class(Exception); diff --git a/contrib/dotzlib/DotZLib/UnitTests.cs b/contrib/dotzlib/DotZLib/UnitTests.cs index 6b532e25..2714a4b4 100644 --- a/contrib/dotzlib/DotZLib/UnitTests.cs +++ b/contrib/dotzlib/DotZLib/UnitTests.cs @@ -156,7 +156,7 @@ namespace DotZLibTests public void Info_Version() { Info info = new Info(); - Assert.AreEqual("1.3.1.2", Info.Version); + Assert.AreEqual("1.3.2", Info.Version); Assert.AreEqual(32, info.SizeOfUInt); Assert.AreEqual(32, info.SizeOfULong); Assert.AreEqual(32, info.SizeOfPointer); diff --git a/contrib/infback9/inftree9.c b/contrib/infback9/inftree9.c index 0f06e0f4..cb96cf87 100644 --- a/contrib/infback9/inftree9.c +++ b/contrib/infback9/inftree9.c @@ -1,5 +1,5 @@ /* inftree9.c -- generate Huffman trees for efficient decoding - * Copyright (C) 1995-2025 Mark Adler + * Copyright (C) 1995-2026 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -9,7 +9,7 @@ #define MAXBITS 15 const char inflate9_copyright[] = - " inflate9 1.3.1.2 Copyright 1995-2025 Mark Adler "; + " inflate9 1.3.2 Copyright 1995-2026 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -59,7 +59,7 @@ int inflate_table9(codetype type, unsigned short FAR *lens, unsigned codes, static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129, 130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132, - 133, 133, 133, 133, 144, 64, 204}; + 133, 133, 133, 133, 144, 199, 75}; static const unsigned short dbase[32] = { /* Distance codes 0..31 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, diff --git a/contrib/minizip/MiniZip64_info.txt b/contrib/minizip/MiniZip64_info.txt index 86487d18..7ca3d05b 100644 --- a/contrib/minizip/MiniZip64_info.txt +++ b/contrib/minizip/MiniZip64_info.txt @@ -1,4 +1,4 @@ -MiniZip - Copyright (c) 1998-2010 - by Gilles Vollant - version 1.1 64 bits from Mathias Svensson +MiniZip - Copyright (c) 1998-2026 - by Gilles Vollant - version 1.1 64 bits from Mathias Svensson Introduction --------------------- diff --git a/contrib/minizip/configure.ac b/contrib/minizip/configure.ac index 339d6dc0..b739fa0c 100644 --- a/contrib/minizip/configure.ac +++ b/contrib/minizip/configure.ac @@ -1,7 +1,7 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -AC_INIT([minizip], [1.3.1.2], [bugzilla.redhat.com]) +AC_INIT([minizip], [1.3.2], [bugzilla.redhat.com]) AC_CONFIG_SRCDIR([minizip.c]) AM_INIT_AUTOMAKE([foreign]) LT_INIT diff --git a/contrib/minizip/crypt.h b/contrib/minizip/crypt.h index d1827c31..dd548938 100644 --- a/contrib/minizip/crypt.h +++ b/contrib/minizip/crypt.h @@ -1,9 +1,6 @@ /* crypt.h -- base code for crypt/uncrypt ZIPfile - - Version 1.01e, February 12th, 2005 - - Copyright (C) 1998-2005 Gilles Vollant + Copyright (C) 1998-2026 Gilles Vollant This code is a modified version of crypting code in Infozip distribution diff --git a/contrib/minizip/ioapi.c b/contrib/minizip/ioapi.c index 04989887..3ee97516 100644 --- a/contrib/minizip/ioapi.c +++ b/contrib/minizip/ioapi.c @@ -1,7 +1,7 @@ /* ioapi.h -- IO base function header for compress/uncompress .zip part of the MiniZip project - ( https://www.winimage.com/zLibDll/minizip.html ) - Copyright (C) 1998-2010 Gilles Vollant (minizip) ( https://www.winimage.com/zLibDll/minizip.html ) + Copyright (C) 1998-2026 Gilles Vollant (minizip) ( https://www.winimage.com/zLibDll/minizip.html ) Modifications for Zip64 support Copyright (C) 2009-2010 Mathias Svensson ( https://result42.com ) diff --git a/contrib/minizip/ioapi.h b/contrib/minizip/ioapi.h index 569857fc..a5211239 100644 --- a/contrib/minizip/ioapi.h +++ b/contrib/minizip/ioapi.h @@ -1,7 +1,7 @@ /* ioapi.h -- IO base function header for compress/uncompress .zip part of the MiniZip project - ( https://www.winimage.com/zLibDll/minizip.html ) - Copyright (C) 1998-2010 Gilles Vollant (minizip) ( https://www.winimage.com/zLibDll/minizip.html ) + Copyright (C) 1998-2026 Gilles Vollant (minizip) ( https://www.winimage.com/zLibDll/minizip.html ) Modifications for Zip64 support Copyright (C) 2009-2010 Mathias Svensson ( https://result42.com ) diff --git a/contrib/minizip/iowin32.c b/contrib/minizip/iowin32.c index abd51535..810ab2cc 100644 --- a/contrib/minizip/iowin32.c +++ b/contrib/minizip/iowin32.c @@ -1,8 +1,7 @@ /* iowin32.c -- IO base function header for compress/uncompress .zip - Version 1.1, February 14h, 2010 part of the MiniZip project - ( https://www.winimage.com/zLibDll/minizip.html ) - Copyright (C) 1998-2010 Gilles Vollant (minizip) ( https://www.winimage.com/zLibDll/minizip.html ) + Copyright (C) 1998-2026 Gilles Vollant (minizip) ( https://www.winimage.com/zLibDll/minizip.html ) Modifications for Zip64 support Copyright (C) 2009-2010 Mathias Svensson ( https://result42.com ) diff --git a/contrib/minizip/iowin32.h b/contrib/minizip/iowin32.h index 345ac93a..65be6270 100644 --- a/contrib/minizip/iowin32.h +++ b/contrib/minizip/iowin32.h @@ -1,8 +1,7 @@ /* iowin32.h -- IO base function header for compress/uncompress .zip - Version 1.1, February 14h, 2010 part of the MiniZip project - ( https://www.winimage.com/zLibDll/minizip.html ) - Copyright (C) 1998-2010 Gilles Vollant (minizip) ( https://www.winimage.com/zLibDll/minizip.html ) + Copyright (C) 1998-2026 Gilles Vollant (minizip) ( https://www.winimage.com/zLibDll/minizip.html ) Modifications for Zip64 support Copyright (C) 2009-2010 Mathias Svensson ( https://result42.com ) diff --git a/contrib/minizip/miniunz.c b/contrib/minizip/miniunz.c index 8aa788f1..cd577ea0 100644 --- a/contrib/minizip/miniunz.c +++ b/contrib/minizip/miniunz.c @@ -1,9 +1,8 @@ /* miniunz.c - Version 1.1, February 14h, 2010 sample part of the MiniZip project - ( https://www.winimage.com/zLibDll/minizip.html ) - Copyright (C) 1998-2010 Gilles Vollant (minizip) ( https://www.winimage.com/zLibDll/minizip.html ) + Copyright (C) 1998-2026 Gilles Vollant (minizip) ( https://www.winimage.com/zLibDll/minizip.html ) Modifications of Unzip for Zip64 Copyright (C) 2007-2008 Even Rouault diff --git a/contrib/minizip/minizip.c b/contrib/minizip/minizip.c index 46a6d798..f68bea1d 100644 --- a/contrib/minizip/minizip.c +++ b/contrib/minizip/minizip.c @@ -1,9 +1,8 @@ /* minizip.c - Version 1.1, February 14h, 2010 sample part of the MiniZip project - ( https://www.winimage.com/zLibDll/minizip.html ) - Copyright (C) 1998-2010 Gilles Vollant (minizip) ( https://www.winimage.com/zLibDll/minizip.html ) + Copyright (C) 1998-2026 Gilles Vollant (minizip) ( https://www.winimage.com/zLibDll/minizip.html ) Modifications of Unzip for Zip64 Copyright (C) 2007-2008 Even Rouault diff --git a/contrib/minizip/skipset.h b/contrib/minizip/skipset.h index 9bef1850..ec4d4ab4 100644 --- a/contrib/minizip/skipset.h +++ b/contrib/minizip/skipset.h @@ -1,5 +1,5 @@ /* skipset.h -- set operations using a skiplist -// Copyright (C) 2024 Mark Adler +// Copyright (C) 2024-2026 Mark Adler // See MiniZip_info.txt for the license. // This implements a skiplist set, i.e. just keys, no data, with ~O(log n) time diff --git a/contrib/minizip/unzip.c b/contrib/minizip/unzip.c index 44c51bd3..d7ff21cb 100644 --- a/contrib/minizip/unzip.c +++ b/contrib/minizip/unzip.c @@ -1,8 +1,7 @@ /* unzip.c -- IO for uncompress .zip files using zlib - Version 1.1, February 14h, 2010 part of the MiniZip project - ( https://www.winimage.com/zLibDll/minizip.html ) - Copyright (C) 1998-2010 Gilles Vollant (minizip) ( https://www.winimage.com/zLibDll/minizip.html ) + Copyright (C) 1998-2026 Gilles Vollant (minizip) ( https://www.winimage.com/zLibDll/minizip.html ) Modifications of Unzip for Zip64 Copyright (C) 2007-2008 Even Rouault diff --git a/contrib/minizip/unzip.h b/contrib/minizip/unzip.h index a3f18949..9c98b608 100644 --- a/contrib/minizip/unzip.h +++ b/contrib/minizip/unzip.h @@ -1,8 +1,7 @@ /* unzip.h -- IO for uncompress .zip files using zlib - Version 1.1, February 14h, 2010 part of the MiniZip project - ( https://www.winimage.com/zLibDll/minizip.html ) - Copyright (C) 1998-2010 Gilles Vollant (minizip) ( https://www.winimage.com/zLibDll/minizip.html ) + Copyright (C) 1998-2026 Gilles Vollant (minizip) ( https://www.winimage.com/zLibDll/minizip.html ) Modifications of Unzip for Zip64 Copyright (C) 2007-2008 Even Rouault diff --git a/contrib/minizip/zip.c b/contrib/minizip/zip.c index 0ec6fe1b..31005c51 100644 --- a/contrib/minizip/zip.c +++ b/contrib/minizip/zip.c @@ -1,8 +1,7 @@ /* zip.c -- IO on .zip files using zlib - Version 1.1, February 14h, 2010 part of the MiniZip project - ( https://www.winimage.com/zLibDll/minizip.html ) - Copyright (C) 1998-2010 Gilles Vollant (minizip) ( https://www.winimage.com/zLibDll/minizip.html ) + Copyright (C) 1998-2026 Gilles Vollant (minizip) ( https://www.winimage.com/zLibDll/minizip.html ) Modifications for Zip64 support Copyright (C) 2009-2010 Mathias Svensson ( https://result42.com ) diff --git a/contrib/minizip/zip.h b/contrib/minizip/zip.h index 522c6c74..99624407 100644 --- a/contrib/minizip/zip.h +++ b/contrib/minizip/zip.h @@ -1,8 +1,7 @@ /* zip.h -- IO on .zip files using zlib - Version 1.1, February 14h, 2010 part of the MiniZip project - ( https://www.winimage.com/zLibDll/minizip.html ) - Copyright (C) 1998-2010 Gilles Vollant (minizip) ( https://www.winimage.com/zLibDll/minizip.html ) + Copyright (C) 1998-2026 Gilles Vollant (minizip) ( https://www.winimage.com/zLibDll/minizip.html ) Modifications for Zip64 support Copyright (C) 2009-2010 Mathias Svensson ( https://result42.com ) diff --git a/contrib/nuget/nuget.csproj b/contrib/nuget/nuget.csproj index 06391345..ead9a205 100644 --- a/contrib/nuget/nuget.csproj +++ b/contrib/nuget/nuget.csproj @@ -6,8 +6,8 @@ $(PackageId).win $(PackageId).linux $(PackageId).osx - (C) 1995-2025 Jean-loup Gailly and Mark Adler - 1.3.1.2 + (C) 1995-2026 Jean-loup Gailly and Mark Adler + 1.3.2 NuGet Package for consuming native builds of zlib into .NET without complexity. README