[vlc-commits] [Git][videolan/vlc][master] 2 commits: contrib: zlib: update to 1.4

Steve Lhomme (@robUx4) gitlab at videolan.org
Sun Nov 8 13:25:27 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
f36a400b by Steve Lhomme at 2026-11-08T09:40:09+00:00
contrib: zlib: update to 1.4

Changelog [^1]:

Breaking changes

    CMake:
        The minimum CMake version is now 3.15, up from 3.12.
        Library file names changed on MSVC: z is now libz, as in libz.dll, libz.lib, and the static libzs.lib. minizip's libraries changed the same way.
        On Cygwin, the libraries now use the lib prefix.
        Contrib targets and tests built as part of zlib are now prefixed with zlib_. Several test targets were renamed to one scheme, for example zlib_examplestatic and minigzipstatic.
        The zlib1.dll option ENABLE_BZIP2 is now ZLIB1_DLL_ENABLE_BZIP2.
    When not otherwise determined, z_off_t is again long, as in 1.3.1, instead of 1.3.2's long long. Windows applications built with 1.3.2 headers should be recompiled; see Enhancements for 64-bit offsets.
    deflateReset() now resets the gzip header set by deflateSetHeader(), as zlib.h has always said. Code relying on the header persisting must set it again.
    Raw deflate that completes exactly at the end of the output buffer now returns Z_STREAM_END instead of Z_OK, as documented.
    gzopen() with "x" now fails where O_EXCL isn't available, instead of truncating an existing file (Trail of Bits TOB-ZLIB-009).
    gzip reading now delivers the data decompressed before a read error, and only then reports the error.

Security fixes

    Non-blocking gzwrite() had a buffer overflow; CVE-2026-85091 (reported by mat-mo; also TOB-ZLIB-003).
    inflateGetDictionary() could write up to 8 MB past the caller's 32K buffer (Theorem THM-ZLIB-001). This took a zlib header with an invalid window size, then inflateReset() or inflateSync(). Affects 1.3.1 and 1.3.2.
    inflateSync() before the window size was known allocated a one-byte window that could later be overrun (TOB-ZLIB-004).
    inflatePrime() could lead inflate() to read before the start of the input (TOB-ZLIB-014).
    Repeated deflatePrime() calls could write past the pending buffer (TOB-ZLIB-013).
    inflateBack() failed to detect distances too far back, and copied uninitialized memory to the output (reported by Kornel Lesiński).
    gzseek() forward before any data was written could write uninitialized memory to the gzip output (found by Claude Opus 5.5).
    deflateResetKeep() used mid-stream could read outside the window (reported by Jason Gross).
    gzdopen() now sets close-on-exec with the correct flag (TOB-ZLIB-008).
    minizip:
        A double free in block_central_name() (reported by Oculytic), and a NULL dereference on repeated zipAlreadyThere() calls after a bad central directory (reported by Naveed Khan).
        Validation of extra-field sizes, plus portable, alignment-safe reading, in zipRemoveExtraInfoBlock() (reported by Naveed Khan and jmestwa-coder).
        unzip no longer reads Zip64 values from outside their extra-field record (reported by Mohamed Elnady). It also uses only the Zip64 locator immediately before the end of central directory record (reported by snajafov). Crafted archives could make minizip report different entries than other readers.
        miniunz could create directories outside the extraction directory (reported by Naveed Khan), and on Windows write files anywhere (reported by Trail of Bits). Fixed by Naveed Khan. Path names are now processed by component.
    contrib/infback9: removed out-of-bounds pointer arithmetic in inftree9.c; CVE-2026-4738 (fix by npt-1707, submitted by CrossVR). The pointers return in bounds before use and no known compiler mishandles this, so the critical rating overstates it, though it could trap on capability hardware such as CHERI.

Bug fixes

    gzip reading:
        Restored the detection of truncated gzip streams, part of which was lost in 1.3.2. Also fixed a complete stream being reported as truncated.
        An error in the first member is no longer treated as trailing garbage.
        Corrected pending-skip handling in gz_skip(), gzdirect() and forced seeks at EOF.
        gzgets() now returns an empty string when promised.
    gzip writing:
        Successive SEEK_CUR seeks no longer lose zero fill.
        Zero fill is now handled correctly after a write error.
        gzprintf() is now all-or-nothing when blocked, and is no longer a stub when compiled as C++.
        gzseek() leaves the position unchanged on failure.
        gzopen_w() now works with paths not representable in the locale.
    inflate:
        total_in was short six bytes on Z_NEED_DICT.
        inflateReset() now restores the requested window size, and the wrap after inflateSync().
        inflateSetDictionary() rejects a null dictionary.
        With PKZIP_BUG_WORKAROUND, the code tables were slightly too small.
    deflate:
        A bad deflateSetDictionary() call is now detected as promised.
        A failed deflateCopy() or inflateCopy() leaves the destination safe to end.
        Removed a possible overflow in deflate_stored() comparisons.
    Undefined behavior removed in gzwrite.c, gzseek, gz_vacate() and mztools.c.
    minizip:
        zip.c no longer writes corrupt headers when a Zip64 field overflows an extra field (reported by mzfr and itsgaldoron), or for Zip64 entries with file comments.
        zipOpen3() no longer leaks memory or returns a freed comment pointer on failure.
        Added allocation checks.
    Build:
        configure now builds the shared library with linkers such as lld that reject undefined symbols in zlib.map, including for --solo.
        zlib.h no longer depends on NULL being defined.
        zip.c builds with NO_ADDFILEINEXISTINGZIP.
        The test programs use the generated zconf.h when building out of tree.
    Many CMake fixes: pkg-config files, installation of headers and of minizip's configuration, symbol prefixing, assembler detection, and parallel testing. It also works with CMake 4.

Enhancements

    64-bit offsets on Windows with MSVC or MinGW, by compiling the application with _FILE_OFFSET_BITS=64 or _LARGEFILE64_SOURCE. The library itself needs no changes.
    Platforms:
        Android large file support.
        An export list on AIX.
        -Wno-psabi, only where the PowerPC note would appear.
        s390x VGFMAFLAG in configure.
        Win32 Makefile.msc builds for ARM64.
        minigzip's mmap code uses POSIX types.
    CMake:
        Package components, with _FOUND variables.
        Installation and export of zlib1.dll and zlibwapi.dll.
        Contribs build standalone, with zlib's defaults.
        Tests consolidated, and tests on Windows.
    minizip:
        The traditional encryption header uses a PCG generator instead of rand().
        Fewer compiler warnings.
    Documentation:
        Clarified that undocumented functions are not part of the API.
        inflateGetHeader() header reuse.
        deflateBound() and deflateSetDictionary() ordering.
        The application's responsibilities in unzip.h.

Known issues

    contrib/iostream2 is unsafe on untrusted input (reported by Trail of Bits). When reading a string, it uses the length stored in the compressed data without checking it, so a crafted file can write past the end of the destination buffer. Use contrib/iostream3 instead.

[^1]: https://github.com/madler/zlib/releases/tag/v1.4

- - - - -
978212a4 by Steve Lhomme at 2026-11-08T09:40:09+00:00
contrib: png: update to 1.6.59

Changelog [^1]:

* Fixed CVE-2026-46675 (medium severity): Use-after-free of zlib input in png_read_end after incomplete zTXt, iTXt or iCCP decompression. (Reported independently by Ze Sheng and JasonHonKL at users.noreply.github.com.)
* Fixed a regression introduced in version 1.6.47 that caused libpng to reject hIST chunks in their correct position, after PLTE. (Contributed by Yuki Sekiguchi.)
* Prevented a double free of png_struct members after an allocation failure. (Contributed by Anthony Hurtado.)
* Applied fixes and updates to the CMake build.
* Adopted the REUSE Specification for licensing the CI files.

[^1]: https://sourceforge.net/projects/libpng/files/libpng16/1.6.59/

- - - - -


4 changed files:

- contrib/src/png/SHA512SUMS
- contrib/src/png/rules.mak
- contrib/src/zlib/SHA512SUMS
- contrib/src/zlib/rules.mak


Changes:

=====================================
contrib/src/png/SHA512SUMS
=====================================
@@ -1 +1 @@
-5937d6409d7ad564c9dba7969c5d39eea8bbc01936f433bf5936c872ec290dea353783f89bded91e124b3b3b15518320097de365acd3b0bcc922a0e90c94adc8  libpng-1.6.58.tar.xz
+e7d9d1b5f7648213ff5daf20789eda9400da7a23af9c9b0a6668e72dae69bd8944fc71c76a5ff2ed70dcb2cb74bb680020763a0a5914120ee5a3910df575fbf6  libpng-1.6.59.tar.xz


=====================================
contrib/src/png/rules.mak
=====================================
@@ -1,5 +1,5 @@
 # PNG
-PNG_VERSION := 1.6.58
+PNG_VERSION := 1.6.59
 PNG_URL := $(SF)/libpng/libpng16/$(PNG_VERSION)/libpng-$(PNG_VERSION).tar.xz
 
 PKGS += png
@@ -20,9 +20,8 @@ png: libpng-$(PNG_VERSION).tar.xz .sum-png
 
 DEPS_png = zlib $(DEPS_zlib)
 
-PNG_CONF := -DPNG_SHARED=OFF -DPNG_TESTS=OFF -DPNG_TOOLS=OFF -DPNG_FRAMEWORK=OFF
-
-PNG_CONF += -DPNG_DEBUG_POSTFIX:STRING=
+PNG_CONF := -DPNG_SHARED=OFF -DPNG_TESTS=OFF -DPNG_TOOLS=OFF -DPNG_FRAMEWORK=OFF \
+	-DPNG_DEBUG_POSTFIX:STRING=
 
 ifeq ($(ARCH),arm)
 ifdef HAVE_IOS


=====================================
contrib/src/zlib/SHA512SUMS
=====================================
@@ -1 +1 @@
-cf3d49fbabddc57cca99858feeca8f910e9de42a16014cddd406814d2d24ee33fee2af3805d7efbb1b04b05f55818092b000daf82502b675df65f2512c353f73  zlib-1.3.2.tar.xz
+c6701ef216f2ea451056466794c520df62af0a7ddf57c907c3263678dc625f3d6466e0187106dec0d7721ad6fc6cf105e0f93a4cac82fbcc2ba919eebd29c0b0  zlib-1.4.tar.xz


=====================================
contrib/src/zlib/rules.mak
=====================================
@@ -1,5 +1,5 @@
 # ZLIB
-ZLIB_VERSION := 1.3.2
+ZLIB_VERSION := 1.4
 ZLIB_URL := $(GITHUB)/madler/zlib/releases/download/v$(ZLIB_VERSION)/zlib-$(ZLIB_VERSION).tar.xz
 
 PKGS += zlib



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/f94b611735dbcb4cd21a7a106b713b442128c4b7...978212a42d569a8d13fd83eae205e1bff4c7096d

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/f94b611735dbcb4cd21a7a106b713b442128c4b7...978212a42d569a8d13fd83eae205e1bff4c7096d
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list