Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/java.desktop/share/legal/libpng.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## libpng v1.6.56
## libpng v1.6.57

### libpng License
<pre>
Expand Down Expand Up @@ -180,6 +180,7 @@ Authors, for copyright and licensing purposes.
* Mans Rullgard
* Matt Sarett
* Mike Klein
* Mohammad Seet
* Pascal Massimino
* Paul Schmidt
* Petr Simecek
Expand Down
11 changes: 11 additions & 0 deletions src/java.desktop/share/native/libsplashscreen/libpng/CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -6368,6 +6368,17 @@ Version 1.6.56 [March 25, 2026]
(Contributed by Bob Friesenhahn and Philippe Antoine.)
Performed various refactorings and cleanups.

Version 1.6.57 [April 8, 2026]
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 <Iv4n550@users.noreply.github.com>.)
Fixed integer overflow in rowbytes computation in read transforms.
(Contributed by Mohammad Seet.)

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>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
README for libpng version 1.6.56
README for libpng version 1.6.57
================================

See the note about version numbers near the top of `png.h`.
Expand Down
4 changes: 2 additions & 2 deletions src/java.desktop/share/native/libsplashscreen/libpng/png.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,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_56 Your_png_h_is_not_version_1_6_56;
typedef png_libpng_version_1_6_57 Your_png_h_is_not_version_1_6_57;

/* Sanity check the chunks definitions - PNG_KNOWN_CHUNKS from pngpriv.h and the
* corresponding macro definitions. This causes a compile time failure if
Expand Down Expand Up @@ -849,7 +849,7 @@ png_get_copyright(png_const_structrp png_ptr)
return PNG_STRING_COPYRIGHT
#else
return PNG_STRING_NEWLINE \
"libpng version 1.6.56" PNG_STRING_NEWLINE \
"libpng version 1.6.57" 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 \
Expand Down
14 changes: 7 additions & 7 deletions src/java.desktop/share/native/libsplashscreen/libpng/png.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
*
* libpng version 1.6.56
* libpng version 1.6.57
*
* Copyright (c) 2018-2026 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
Expand All @@ -43,7 +43,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.56, March 2026:
* libpng versions 1.6.36, December 2018, through 1.6.57, April 2026:
* Cosmin Truta
* See also "Contributing Authors", below.
*/
Expand Down Expand Up @@ -267,7 +267,7 @@
* ...
* 1.5.30 15 10530 15.so.15.30[.0]
* ...
* 1.6.56 16 10656 16.so.16.56[.0]
* 1.6.57 16 10657 16.so.16.57[.0]
*
* Henceforth the source version will match the shared-library major and
* minor numbers; the shared-library major version number will be used for
Expand Down Expand Up @@ -303,7 +303,7 @@
*/

/* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.6.56"
#define PNG_LIBPNG_VER_STRING "1.6.57"
#define PNG_HEADER_VERSION_STRING " libpng version " PNG_LIBPNG_VER_STRING "\n"

/* The versions of shared library builds should stay in sync, going forward */
Expand All @@ -314,7 +314,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 56
#define PNG_LIBPNG_VER_RELEASE 57

/* This should be zero for a public release, or non-zero for a
* development version.
Expand Down Expand Up @@ -345,7 +345,7 @@
* From version 1.0.1 it is:
* XXYYZZ, where XX=major, YY=minor, ZZ=release
*/
#define PNG_LIBPNG_VER 10656 /* 1.6.56 */
#define PNG_LIBPNG_VER 10657 /* 1.6.57 */

/* Library configuration: these options cannot be changed after
* the library has been built.
Expand Down Expand Up @@ -455,7 +455,7 @@ extern "C" {
/* 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_56;
typedef char *png_libpng_version_1_6_57;

/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
*
* libpng version 1.6.56
* libpng version 1.6.57
*
* Copyright (c) 2018-2026 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
*/
/* libpng version 1.6.56 */
/* libpng version 1.6.57 */

/* Copyright (c) 2018-2026 Cosmin Truta */
/* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson */
Expand Down
28 changes: 14 additions & 14 deletions src/java.desktop/share/native/libsplashscreen/libpng/pngrtran.c
Original file line number Diff line number Diff line change
Expand Up @@ -2408,7 +2408,7 @@ png_do_unpack(png_row_infop row_info, png_bytep row)
}
row_info->bit_depth = 8;
row_info->pixel_depth = (png_byte)(8 * row_info->channels);
row_info->rowbytes = row_width * row_info->channels;
row_info->rowbytes = (size_t)row_width * row_info->channels;
}
}
#endif
Expand Down Expand Up @@ -2610,7 +2610,7 @@ png_do_scale_16_to_8(png_row_infop row_info, png_bytep row)

row_info->bit_depth = 8;
row_info->pixel_depth = (png_byte)(8 * row_info->channels);
row_info->rowbytes = row_info->width * row_info->channels;
row_info->rowbytes = (size_t)row_info->width * row_info->channels;
}
}
#endif
Expand Down Expand Up @@ -2638,7 +2638,7 @@ png_do_chop(png_row_infop row_info, png_bytep row)

row_info->bit_depth = 8;
row_info->pixel_depth = (png_byte)(8 * row_info->channels);
row_info->rowbytes = row_info->width * row_info->channels;
row_info->rowbytes = (size_t)row_info->width * row_info->channels;
}
}
#endif
Expand Down Expand Up @@ -2874,7 +2874,7 @@ png_do_read_filler(png_row_infop row_info, png_bytep row,
*(--dp) = lo_filler;
row_info->channels = 2;
row_info->pixel_depth = 16;
row_info->rowbytes = row_width * 2;
row_info->rowbytes = (size_t)row_width * 2;
}

else
Expand All @@ -2889,7 +2889,7 @@ png_do_read_filler(png_row_infop row_info, png_bytep row,
}
row_info->channels = 2;
row_info->pixel_depth = 16;
row_info->rowbytes = row_width * 2;
row_info->rowbytes = (size_t)row_width * 2;
}
}

Expand All @@ -2912,7 +2912,7 @@ png_do_read_filler(png_row_infop row_info, png_bytep row,
*(--dp) = hi_filler;
row_info->channels = 2;
row_info->pixel_depth = 32;
row_info->rowbytes = row_width * 4;
row_info->rowbytes = (size_t)row_width * 4;
}

else
Expand All @@ -2929,7 +2929,7 @@ png_do_read_filler(png_row_infop row_info, png_bytep row,
}
row_info->channels = 2;
row_info->pixel_depth = 32;
row_info->rowbytes = row_width * 4;
row_info->rowbytes = (size_t)row_width * 4;
}
}
#endif
Expand All @@ -2953,7 +2953,7 @@ png_do_read_filler(png_row_infop row_info, png_bytep row,
*(--dp) = lo_filler;
row_info->channels = 4;
row_info->pixel_depth = 32;
row_info->rowbytes = row_width * 4;
row_info->rowbytes = (size_t)row_width * 4;
}

else
Expand All @@ -2970,7 +2970,7 @@ png_do_read_filler(png_row_infop row_info, png_bytep row,
}
row_info->channels = 4;
row_info->pixel_depth = 32;
row_info->rowbytes = row_width * 4;
row_info->rowbytes = (size_t)row_width * 4;
}
}

Expand All @@ -2997,7 +2997,7 @@ png_do_read_filler(png_row_infop row_info, png_bytep row,
*(--dp) = hi_filler;
row_info->channels = 4;
row_info->pixel_depth = 64;
row_info->rowbytes = row_width * 8;
row_info->rowbytes = (size_t)row_width * 8;
}

else
Expand All @@ -3019,7 +3019,7 @@ png_do_read_filler(png_row_infop row_info, png_bytep row,

row_info->channels = 4;
row_info->pixel_depth = 64;
row_info->rowbytes = row_width * 8;
row_info->rowbytes = (size_t)row_width * 8;
}
}
#endif
Expand Down Expand Up @@ -4513,15 +4513,15 @@ png_do_expand_palette(png_structrp png_ptr, png_row_infop row_info,
}
row_info->bit_depth = 8;
row_info->pixel_depth = 32;
row_info->rowbytes = row_width * 4;
row_info->rowbytes = (size_t)row_width * 4;
row_info->color_type = 6;
row_info->channels = 4;
}

else
{
sp = row + (size_t)row_width - 1;
dp = row + (size_t)(row_width * 3) - 1;
dp = row + (size_t)row_width * 3 - 1;
i = 0;
#ifdef PNG_ARM_NEON_INTRINSICS_AVAILABLE
i = png_do_expand_palette_rgb8_neon(png_ptr, row_info, row,
Expand All @@ -4540,7 +4540,7 @@ png_do_expand_palette(png_structrp png_ptr, png_row_infop row_info,

row_info->bit_depth = 8;
row_info->pixel_depth = 24;
row_info->rowbytes = row_width * 3;
row_info->rowbytes = (size_t)row_width * 3;
row_info->color_type = 2;
row_info->channels = 3;
}
Expand Down
Loading