Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libpng16 for openSUSE:Factory checked in at 2026-07-26 11:26:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libpng16 (Old) and /work/SRC/openSUSE:Factory/.libpng16.new.2004 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libpng16" Sun Jul 26 11:26:38 2026 rev:66 rq:1367471 version:1.6.58 Changes: -------- --- /work/SRC/openSUSE:Factory/libpng16/libpng16.changes 2026-04-16 17:25:09.722965803 +0200 +++ /work/SRC/openSUSE:Factory/.libpng16.new.2004/libpng16.changes 2026-07-26 11:26:40.231000953 +0200 @@ -1,0 +2,8 @@ +Thu Jul 23 14:01:06 UTC 2026 - Petr Gajdos <[email protected]> + +- version update to 1.6.58: + * Fixed a regression introduced in version 1.6.56 that caused `png_get_PLTE` + to return stale palette data after applying gamma and background transforms + in-place. + +------------------------------------------------------------------- Old: ---- libpng-1.6.57.tar.gz New: ---- libpng-1.6.58.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libpng16.spec ++++++ --- /var/tmp/diff_new_pack.8kzgQp/_old 2026-07-26 11:26:40.755018934 +0200 +++ /var/tmp/diff_new_pack.8kzgQp/_new 2026-07-26 11:26:40.755018934 +0200 @@ -20,7 +20,7 @@ %define asan_build 0 %define major 1 %define minor 6 -%define micro 57 +%define micro 58 %define branch %{major}%{minor} %define libname libpng%{branch}-%{branch} %define debug_package_requires %{libname} = %{version}-%{release} ++++++ libpng-1.6.57.tar.gz -> libpng-1.6.58.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpng-1.6.57/.gitignore new/libpng-1.6.58/.gitignore --- old/libpng-1.6.57/.gitignore 2026-04-08 22:49:24.000000000 +0200 +++ new/libpng-1.6.58/.gitignore 2026-04-15 19:23:26.000000000 +0200 @@ -148,6 +148,7 @@ /png-fix-itxt /pngcp /pngfix +/pnggetset /pngimage /pngstest /pngtest diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpng-1.6.57/ANNOUNCE new/libpng-1.6.58/ANNOUNCE --- old/libpng-1.6.57/ANNOUNCE 2026-04-08 22:49:24.000000000 +0200 +++ new/libpng-1.6.58/ANNOUNCE 2026-04-15 19:23:26.000000000 +0200 @@ -1,5 +1,5 @@ -libpng 1.6.57 - April 8, 2026 -============================= +libpng 1.6.58 - April 15, 2026 +============================== This is a public release of libpng, intended for use in production code. @@ -9,10 +9,10 @@ Source files: - * libpng-1.6.57.tar.xz (LZMA-compressed, recommended) - * libpng-1.6.57.tar.gz (deflate-compressed) - * lpng1657.7z (LZMA-compressed) - * lpng1657.zip (deflate-compressed) + * libpng-1.6.58.tar.xz (LZMA-compressed, recommended) + * libpng-1.6.58.tar.gz (deflate-compressed) + * lpng1658.7z (LZMA-compressed) + * lpng1658.zip (deflate-compressed) Other information: @@ -22,18 +22,13 @@ * TRADEMARK.md -Changes from version 1.6.56 to version 1.6.57 +Changes from version 1.6.57 to version 1.6.58 --------------------------------------------- - * Fixed CVE-2026-34757 (medium severity): - Use-after-free in `png_set_PLTE`, `png_set_tRNS` and `png_set_hIST` - leading to corrupted chunk data and potential heap information disclosure. - Also hardened the append-style setters (`png_set_text`, `png_set_sPLT`, - `png_set_unknown_chunks`) against a theoretical variant of the same - aliasing pattern. - (Reported by Iv4n <[email protected]>.) - * Fixed integer overflow in rowbytes computation in read transforms. - (Contributed by Mohammad Seet.) + * Fixed a regression introduced in version 1.6.56 that caused `png_get_PLTE` + to return stale palette data after applying gamma and background transforms + in-place. + (Reported by ralfjunker <[email protected]>.) Send comments/corrections/commendations to png-mng-implement at lists.sf.net. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpng-1.6.57/CHANGES new/libpng-1.6.58/CHANGES --- old/libpng-1.6.57/CHANGES 2026-04-08 22:49:24.000000000 +0200 +++ new/libpng-1.6.58/CHANGES 2026-04-15 19:23:26.000000000 +0200 @@ -6379,6 +6379,13 @@ Fixed integer overflow in rowbytes computation in read transforms. (Contributed by Mohammad Seet.) +Version 1.6.58 [April 15, 2026] + Fixed a regression introduced in version 1.6.56 that caused `png_get_PLTE` + to return stale palette data after applying gamma and background transforms + in-place. + (Reported by ralfjunker <[email protected]>.) + + Send comments/corrections/commendations to png-mng-implement at lists.sf.net. Subscription is required; visit <https://lists.sourceforge.net/lists/listinfo/png-mng-implement> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpng-1.6.57/CMakeLists.txt new/libpng-1.6.58/CMakeLists.txt --- old/libpng-1.6.57/CMakeLists.txt 2026-04-08 22:49:24.000000000 +0200 +++ new/libpng-1.6.58/CMakeLists.txt 2026-04-15 19:23:26.000000000 +0200 @@ -18,7 +18,7 @@ set(PNGLIB_MAJOR 1) set(PNGLIB_MINOR 6) -set(PNGLIB_REVISION 57) +set(PNGLIB_REVISION 58) set(PNGLIB_SUBREVISION 0) #set(PNGLIB_SUBREVISION "git") set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_REVISION}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpng-1.6.57/README new/libpng-1.6.58/README --- old/libpng-1.6.57/README 2026-04-08 22:49:24.000000000 +0200 +++ new/libpng-1.6.58/README 2026-04-15 19:23:26.000000000 +0200 @@ -1,4 +1,4 @@ -README for libpng version 1.6.57 +README for libpng version 1.6.58 ================================ See the note about version numbers near the top of `png.h`. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpng-1.6.57/configure new/libpng-1.6.58/configure --- old/libpng-1.6.57/configure 2026-04-08 22:49:24.000000000 +0200 +++ new/libpng-1.6.58/configure 2026-04-15 19:23:26.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.73 for libpng 1.6.57. +# Generated by GNU Autoconf 2.73 for libpng 1.6.58. # # Report bugs to <[email protected]>. # @@ -598,8 +598,8 @@ # Identity of this package. PACKAGE_NAME='libpng' PACKAGE_TARNAME='libpng' -PACKAGE_VERSION='1.6.57' -PACKAGE_STRING='libpng 1.6.57' +PACKAGE_VERSION='1.6.58' +PACKAGE_STRING='libpng 1.6.58' PACKAGE_BUGREPORT='[email protected]' PACKAGE_URL='' @@ -1408,7 +1408,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -'configure' configures libpng 1.6.57 to adapt to many kinds of systems. +'configure' configures libpng 1.6.58 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1479,7 +1479,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libpng 1.6.57:";; + short | recursive ) echo "Configuration of libpng 1.6.58:";; esac cat <<\_ACEOF @@ -1682,7 +1682,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libpng configure 1.6.57 +libpng configure 1.6.58 generated by GNU Autoconf 2.73 Copyright (C) 2026 Free Software Foundation, Inc. @@ -1945,7 +1945,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libpng $as_me 1.6.57, which was +It was created by libpng $as_me 1.6.58, which was generated by GNU Autoconf 2.73. Invocation command line was $ $0$ac_configure_args_raw @@ -3565,7 +3565,7 @@ # Define the identity of the package. PACKAGE='libpng' - VERSION='1.6.57' + VERSION='1.6.58' printf '%s\n' "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -3784,10 +3784,10 @@ -PNGLIB_VERSION=1.6.57 +PNGLIB_VERSION=1.6.58 PNGLIB_MAJOR=1 PNGLIB_MINOR=6 -PNGLIB_RELEASE=57 +PNGLIB_RELEASE=58 @@ -16525,7 +16525,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libpng $as_me 1.6.57, which was +This file was extended by libpng $as_me 1.6.58, which was generated by GNU Autoconf 2.73. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16593,7 +16593,7 @@ cat >>"$CONFIG_STATUS" <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -libpng config.status 1.6.57 +libpng config.status 1.6.58 configured by $0, generated by GNU Autoconf 2.73, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpng-1.6.57/configure.ac new/libpng-1.6.58/configure.ac --- old/libpng-1.6.57/configure.ac 2026-04-08 22:49:24.000000000 +0200 +++ new/libpng-1.6.58/configure.ac 2026-04-15 19:23:26.000000000 +0200 @@ -25,7 +25,7 @@ dnl Version number stuff here: -AC_INIT([libpng],[1.6.57],[[email protected]]) +AC_INIT([libpng],[1.6.58],[[email protected]]) AC_CONFIG_MACRO_DIR([scripts/autoconf]) # libpng does not follow GNU file name conventions (hence 'foreign') @@ -46,10 +46,10 @@ dnl AM_PREREQ([1.11.2]) dnl stop configure from automagically running automake -PNGLIB_VERSION=1.6.57 +PNGLIB_VERSION=1.6.58 PNGLIB_MAJOR=1 PNGLIB_MINOR=6 -PNGLIB_RELEASE=57 +PNGLIB_RELEASE=58 dnl End of version number stuff diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpng-1.6.57/contrib/libtests/pnggetset.c new/libpng-1.6.58/contrib/libtests/pnggetset.c --- old/libpng-1.6.57/contrib/libtests/pnggetset.c 2026-04-08 22:49:24.000000000 +0200 +++ new/libpng-1.6.58/contrib/libtests/pnggetset.c 2026-04-15 19:23:26.000000000 +0200 @@ -6,12 +6,7 @@ * For conditions of distribution and use, see the disclaimer * and license in png.h * - * Test the get-then-set roundtrip for chunk types whose getters return - * a pointer to internal storage. - * - * Passing such a pointer back into the corresponding setter must not - * cause a use-after-free. A previous version freed the internal buffer - * before copying from the caller-supplied pointer. + * Test getter and setter correctness. */ #include <stdio.h> @@ -99,9 +94,9 @@ } for (i = 0; i < 4; i++) { - if (got_palette[i].red != (png_byte)(i * 10) || - got_palette[i].green != (png_byte)(i * 20) || - got_palette[i].blue != (png_byte)(i * 30)) + if ((got_palette[i].red != (png_byte)(i * 10)) + || (got_palette[i].green != (png_byte)(i * 20)) + || (got_palette[i].blue != (png_byte)(i * 30))) { fprintf(stderr, "pnggetset: PLTE entry %d corrupted after roundtrip\n", i); @@ -569,6 +564,215 @@ } #endif /* PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED */ +/* Memory buffer for PNG I/O without temp files. */ +#define MEM_BUF_SIZE 4096 + +typedef struct +{ + png_byte data[MEM_BUF_SIZE]; + size_t len; + size_t pos; +} mem_buf; + +static void PNGCBAPI +mem_write(png_structp png_ptr, png_bytep buf, png_size_t length) +{ + mem_buf *mb = (mem_buf *)png_get_io_ptr(png_ptr); + + if (mb->len + length > MEM_BUF_SIZE) + png_error(png_ptr, "pnggetset: write overflow"); + + memcpy(mb->data + mb->len, buf, length); + mb->len += length; +} + +static void PNGCBAPI +mem_flush(png_structp png_ptr) +{ + (void)png_ptr; +} + +static void PNGCBAPI +mem_read(png_structp png_ptr, png_bytep buf, png_size_t length) +{ + mem_buf *mb = (mem_buf *)png_get_io_ptr(png_ptr); + + if (mb->pos + length > mb->len) + png_error(png_ptr, "pnggetset: read overflow"); + + memcpy(buf, mb->data + mb->pos, length); + mb->pos += length; +} + +/* Palette sync after gamma correction. + * + * When info_ptr->palette and png_ptr->palette are separate buffers, + * in-place gamma correction of png_ptr->palette must be synced back + * to info_ptr->palette so that png_get_PLTE returns the corrected + * values. + */ +#define PLTE_SYNC_NPALETTE 4 + +static const png_color plte_sync_original[PLTE_SYNC_NPALETTE] = +{ + { 64, 96, 128 }, + { 128, 160, 192 }, + { 192, 224, 240 }, + { 32, 48, 64 } +}; + +static int +test_plte_palette_sync(void) +{ + mem_buf buf; + png_structp png_ptr; + png_infop info_ptr; + png_colorp got_palette; + int num_palette; + double file_gamma; + png_byte row[1]; + int i; + int changed; + + /* Write a 1x1 palette PNG with gAMA = 1.0 (linear). */ + buf.len = 0; + buf.pos = 0; + + png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, + NULL, NULL, NULL); + if (png_ptr == NULL) + { + fprintf(stderr, "pnggetset: png_create_write_struct failed\n"); + return 1; + } + + info_ptr = png_create_info_struct(png_ptr); + if (info_ptr == NULL) + { + fprintf(stderr, "pnggetset: png_create_info_struct failed\n"); + png_destroy_write_struct(&png_ptr, NULL); + return 1; + } + + if (setjmp(png_jmpbuf(png_ptr))) + { + fprintf(stderr, "pnggetset: libpng error in test_plte_palette_sync" + " (write)\n"); + png_destroy_write_struct(&png_ptr, &info_ptr); + return 1; + } + + png_set_write_fn(png_ptr, &buf, mem_write, mem_flush); + png_set_IHDR(png_ptr, info_ptr, 1, 1, 8, PNG_COLOR_TYPE_PALETTE, + PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, + PNG_FILTER_TYPE_BASE); + png_set_PLTE(png_ptr, info_ptr, + (png_colorp)plte_sync_original, PLTE_SYNC_NPALETTE); + png_set_gAMA(png_ptr, info_ptr, 1.0); + png_write_info(png_ptr, info_ptr); + + row[0] = 0; + png_write_row(png_ptr, row); + png_write_end(png_ptr, info_ptr); + png_destroy_write_struct(&png_ptr, &info_ptr); + + /* Read back with gamma correction as the sole transform. */ + buf.pos = 0; + + png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, + NULL, NULL, NULL); + if (png_ptr == NULL) + { + fprintf(stderr, "pnggetset: png_create_read_struct failed\n"); + return 1; + } + + info_ptr = png_create_info_struct(png_ptr); + if (info_ptr == NULL) + { + fprintf(stderr, "pnggetset: png_create_info_struct failed\n"); + png_destroy_read_struct(&png_ptr, NULL, NULL); + return 1; + } + + if (setjmp(png_jmpbuf(png_ptr))) + { + fprintf(stderr, "pnggetset: libpng error in test_plte_palette_sync" + " (read)\n"); + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return 1; + } + + png_set_read_fn(png_ptr, &buf, mem_read); + png_read_info(png_ptr, info_ptr); + + if (png_get_gAMA(png_ptr, info_ptr, &file_gamma) == 0) + { + fprintf(stderr, "pnggetset: gAMA chunk not found\n"); + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return 1; + } + + png_set_gamma(png_ptr, 2.2, file_gamma); + png_read_update_info(png_ptr, info_ptr); + + if (png_get_PLTE(png_ptr, info_ptr, &got_palette, &num_palette) == 0) + { + fprintf(stderr, "pnggetset: png_get_PLTE failed after update\n"); + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return 1; + } + + if (num_palette != PLTE_SYNC_NPALETTE) + { + fprintf(stderr, "pnggetset: palette size %d, expected %d\n", + num_palette, PLTE_SYNC_NPALETTE); + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return 1; + } + + /* Every entry must differ from the original after gamma correction + * (file_gamma=1.0, screen_gamma=2.2). If the sync was skipped, + * info_ptr->palette still holds the stale pre-correction values. + */ + changed = 0; + + for (i = 0; i < PLTE_SYNC_NPALETTE; i++) + { + if ((got_palette[i].red != plte_sync_original[i].red) + || (got_palette[i].green != plte_sync_original[i].green) + || (got_palette[i].blue != plte_sync_original[i].blue)) + { + changed++; + } + else + { + fprintf(stderr, + "pnggetset: palette entry %d NOT gamma-corrected: " + "got {%u, %u, %u}, same as original\n", + i, + (unsigned)got_palette[i].red, + (unsigned)got_palette[i].green, + (unsigned)got_palette[i].blue); + } + } + + png_read_row(png_ptr, row, NULL); + png_read_end(png_ptr, NULL); + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + + if (changed != PLTE_SYNC_NPALETTE) + { + fprintf(stderr, + "pnggetset: only %d of %d palette entries were " + "gamma-corrected (palette sync failed)\n", + changed, PLTE_SYNC_NPALETTE); + return 1; + } + + return 0; +} + int main(void) { @@ -644,5 +848,15 @@ printf("PASS\n"); #endif + printf("Testing PLTE sync after gamma correction... "); + fflush(stdout); + if (test_plte_palette_sync() != 0) + { + printf("FAIL\n"); + result = 1; + } + else + printf("PASS\n"); + return result; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpng-1.6.57/libpng-manual.txt new/libpng-1.6.58/libpng-manual.txt --- old/libpng-1.6.57/libpng-manual.txt 2026-04-08 22:49:24.000000000 +0200 +++ new/libpng-1.6.58/libpng-manual.txt 2026-04-15 19:23:26.000000000 +0200 @@ -9,7 +9,7 @@ Based on: - libpng version 1.6.36, December 2018, through 1.6.57 - April 2026 + libpng version 1.6.36, December 2018, through 1.6.58 - April 2026 Updated and distributed by Cosmin Truta Copyright (c) 2018-2026 Cosmin Truta diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpng-1.6.57/libpng.3 new/libpng-1.6.58/libpng.3 --- old/libpng-1.6.57/libpng.3 2026-04-08 22:49:24.000000000 +0200 +++ new/libpng-1.6.58/libpng.3 2026-04-15 19:23:26.000000000 +0200 @@ -1,6 +1,6 @@ -.TH LIBPNG 3 "April 8, 2026" +.TH LIBPNG 3 "April 15, 2026" .SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library 1.6.57 +libpng \- Portable Network Graphics (PNG) Reference Library 1.6.58 .SH SYNOPSIS \fB#include <png.h>\fP @@ -528,7 +528,7 @@ Based on: - libpng version 1.6.36, December 2018, through 1.6.57 - April 2026 + libpng version 1.6.36, December 2018, through 1.6.58 - April 2026 Updated and distributed by Cosmin Truta Copyright (c) 2018-2026 Cosmin Truta diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpng-1.6.57/libpngpf.3 new/libpng-1.6.58/libpngpf.3 --- old/libpng-1.6.57/libpngpf.3 2026-04-08 22:49:24.000000000 +0200 +++ new/libpng-1.6.58/libpngpf.3 2026-04-15 19:23:26.000000000 +0200 @@ -1,6 +1,6 @@ -.TH LIBPNGPF 3 "April 8, 2026" +.TH LIBPNGPF 3 "April 15, 2026" .SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library 1.6.57 +libpng \- Portable Network Graphics (PNG) Reference Library 1.6.58 .SH SYNOPSIS \fB#include "pngpriv.h"\fP diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpng-1.6.57/png.5 new/libpng-1.6.58/png.5 --- old/libpng-1.6.57/png.5 2026-04-08 22:49:24.000000000 +0200 +++ new/libpng-1.6.58/png.5 2026-04-15 19:23:26.000000000 +0200 @@ -1,4 +1,4 @@ -.TH PNG 5 "April 8, 2026" +.TH PNG 5 "April 15, 2026" .SH NAME png \- Portable Network Graphics (PNG) format diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpng-1.6.57/png.c new/libpng-1.6.58/png.c --- old/libpng-1.6.57/png.c 2026-04-08 22:49:24.000000000 +0200 +++ new/libpng-1.6.58/png.c 2026-04-15 19:23:26.000000000 +0200 @@ -13,7 +13,7 @@ #include "pngpriv.h" /* Generate a compiler error if there is an old png.h in the search path. */ -typedef png_libpng_version_1_6_57 Your_png_h_is_not_version_1_6_57; +typedef png_libpng_version_1_6_58 Your_png_h_is_not_version_1_6_58; /* Sanity check the chunks definitions - PNG_KNOWN_CHUNKS from pngpriv.h and the * corresponding macro definitions. This causes a compile time failure if @@ -820,7 +820,7 @@ return PNG_STRING_COPYRIGHT #else return PNG_STRING_NEWLINE \ - "libpng version 1.6.57" PNG_STRING_NEWLINE \ + "libpng version 1.6.58" PNG_STRING_NEWLINE \ "Copyright (c) 2018-2026 Cosmin Truta" PNG_STRING_NEWLINE \ "Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson" \ PNG_STRING_NEWLINE \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpng-1.6.57/png.h new/libpng-1.6.58/png.h --- old/libpng-1.6.57/png.h 2026-04-08 22:49:24.000000000 +0200 +++ new/libpng-1.6.58/png.h 2026-04-15 19:23:26.000000000 +0200 @@ -1,6 +1,6 @@ /* png.h - header file for PNG reference library * - * libpng version 1.6.57 + * libpng version 1.6.58 * * Copyright (c) 2018-2026 Cosmin Truta * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson @@ -14,7 +14,7 @@ * libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger * libpng versions 0.97, January 1998, through 1.6.35, July 2018: * Glenn Randers-Pehrson - * libpng versions 1.6.36, December 2018, through 1.6.57, April 2026: + * libpng versions 1.6.36, December 2018, through 1.6.58, April 2026: * Cosmin Truta * See also "Contributing Authors", below. */ @@ -238,7 +238,7 @@ * ... * 1.5.30 15 10530 15.so.15.30[.0] * ... - * 1.6.57 16 10657 16.so.16.57[.0] + * 1.6.58 16 10658 16.so.16.58[.0] * * Henceforth the source version will match the shared-library major and * minor numbers; the shared-library major version number will be used for @@ -274,7 +274,7 @@ */ /* Version information for png.h - this should match the version in png.c */ -#define PNG_LIBPNG_VER_STRING "1.6.57" +#define PNG_LIBPNG_VER_STRING "1.6.58" #define PNG_HEADER_VERSION_STRING " libpng version " PNG_LIBPNG_VER_STRING "\n" /* The versions of shared library builds should stay in sync, going forward */ @@ -285,7 +285,7 @@ /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */ #define PNG_LIBPNG_VER_MAJOR 1 #define PNG_LIBPNG_VER_MINOR 6 -#define PNG_LIBPNG_VER_RELEASE 57 +#define PNG_LIBPNG_VER_RELEASE 58 /* This should be zero for a public release, or non-zero for a * development version. @@ -316,7 +316,7 @@ * From version 1.0.1 it is: * XXYYZZ, where XX=major, YY=minor, ZZ=release */ -#define PNG_LIBPNG_VER 10657 /* 1.6.57 */ +#define PNG_LIBPNG_VER 10658 /* 1.6.58 */ /* Library configuration: these options cannot be changed after * the library has been built. @@ -426,7 +426,7 @@ /* This triggers a compiler error in png.c, if png.c and png.h * do not agree upon the version number. */ -typedef char *png_libpng_version_1_6_57; +typedef char *png_libpng_version_1_6_58; /* Basic control structions. Read libpng-manual.txt or libpng.3 for more info. * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpng-1.6.57/pngconf.h new/libpng-1.6.58/pngconf.h --- old/libpng-1.6.57/pngconf.h 2026-04-08 22:49:24.000000000 +0200 +++ new/libpng-1.6.58/pngconf.h 2026-04-15 19:23:26.000000000 +0200 @@ -1,6 +1,6 @@ /* pngconf.h - machine-configurable file for libpng * - * libpng version 1.6.57 + * libpng version 1.6.58 * * Copyright (c) 2018-2026 Cosmin Truta * Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpng-1.6.57/pngrtran.c new/libpng-1.6.58/pngrtran.c --- old/libpng-1.6.57/pngrtran.c 2026-04-08 22:49:24.000000000 +0200 +++ new/libpng-1.6.58/pngrtran.c 2026-04-15 19:23:26.000000000 +0200 @@ -2070,19 +2070,15 @@ { png_debug(1, "in png_read_transform_info"); - if (png_ptr->transformations != 0) + if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE && + info_ptr->palette != NULL && png_ptr->palette != NULL) { - if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE && - info_ptr->palette != NULL && png_ptr->palette != NULL) - { - /* Sync info_ptr->palette with png_ptr->palette. - * The function png_init_read_transformations may have modified - * png_ptr->palette in place (e.g. for gamma correction or for - * background compositing). - */ - memcpy(info_ptr->palette, png_ptr->palette, - PNG_MAX_PALETTE_LENGTH * (sizeof (png_color))); - } + /* Sync info_ptr->palette with png_ptr->palette, which may + * have been modified by png_init_read_transformations + * (e.g. for gamma correction or background compositing). + */ + memcpy(info_ptr->palette, png_ptr->palette, + PNG_MAX_PALETTE_LENGTH * (sizeof (png_color))); } #ifdef PNG_READ_EXPAND_SUPPORTED diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpng-1.6.57/pngtest.c new/libpng-1.6.58/pngtest.c --- old/libpng-1.6.57/pngtest.c 2026-04-08 22:49:24.000000000 +0200 +++ new/libpng-1.6.58/pngtest.c 2026-04-15 19:23:26.000000000 +0200 @@ -49,9 +49,6 @@ */ #define STDERR stdout -/* Generate a compiler error if there is an old png.h in the search path. */ -typedef png_libpng_version_1_6_57 Your_png_h_is_not_version_1_6_57; - /* Ensure that all version numbers in png.h are consistent with one another. */ #if (PNG_LIBPNG_VER != PNG_LIBPNG_VER_MAJOR * 10000 + \ PNG_LIBPNG_VER_MINOR * 100 + \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpng-1.6.57/scripts/libpng-config-head.in new/libpng-1.6.58/scripts/libpng-config-head.in --- old/libpng-1.6.57/scripts/libpng-config-head.in 2026-04-08 22:49:24.000000000 +0200 +++ new/libpng-1.6.58/scripts/libpng-config-head.in 2026-04-15 19:23:26.000000000 +0200 @@ -11,7 +11,7 @@ # Modeled after libxml-config. -version=1.6.57 +version=1.6.58 prefix="" libdir="" libs="" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpng-1.6.57/scripts/libpng.pc.in new/libpng-1.6.58/scripts/libpng.pc.in --- old/libpng-1.6.57/scripts/libpng.pc.in 2026-04-08 22:49:24.000000000 +0200 +++ new/libpng-1.6.58/scripts/libpng.pc.in 2026-04-15 19:23:26.000000000 +0200 @@ -5,6 +5,6 @@ Name: libpng Description: Loads and saves PNG files -Version: 1.6.57 +Version: 1.6.58 Libs: -L${libdir} -lpng16 Cflags: -I${includedir} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpng-1.6.57/scripts/pnglibconf.h.prebuilt new/libpng-1.6.58/scripts/pnglibconf.h.prebuilt --- old/libpng-1.6.57/scripts/pnglibconf.h.prebuilt 2026-04-08 22:49:24.000000000 +0200 +++ new/libpng-1.6.58/scripts/pnglibconf.h.prebuilt 2026-04-15 19:23:26.000000000 +0200 @@ -1,6 +1,6 @@ /* pnglibconf.h - library build configuration */ -/* libpng version 1.6.57 */ +/* libpng version 1.6.58 */ /* Copyright (c) 2018-2026 Cosmin Truta */ /* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson */
