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 make/modules/java.desktop/lib/ClientLibraries.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
DISABLED_WARNINGS_gcc_dgif_lib.c := sign-compare, \
DISABLED_WARNINGS_gcc_jcmaster.c := implicit-fallthrough, \
DISABLED_WARNINGS_gcc_jdphuff.c := shift-negative-value, \
DISABLED_WARNINGS_gcc_png.c := maybe-uninitialized, \
DISABLED_WARNINGS_gcc_png.c := maybe-uninitialized unused-function, \
DISABLED_WARNINGS_gcc_pngerror.c := maybe-uninitialized, \
DISABLED_WARNINGS_gcc_splashscreen_gfx_impl.c := implicit-fallthrough \
maybe-uninitialized, \
Expand All @@ -246,6 +246,7 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
DISABLED_WARNINGS_clang := deprecated-non-prototype, \
DISABLED_WARNINGS_clang_dgif_lib.c := sign-compare, \
DISABLED_WARNINGS_clang_gzwrite.c := format-nonliteral, \
DISABLED_WARNINGS_clang_png.c := unused-function, \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This warning was disabled to fix the following build issue on linux and macOS.

open/src/java.desktop/share/native/libsplashscreen/libpng/png.c:1558:1: error: 'png_icc_profile_error' defined but not used [-Werror=unused-function]
[2025-03-12T23:57:44,575Z]  1558 | png_icc_profile_error(png_const_structrp png_ptr, png_const_charp name,
[2025-03-12T23:57:44,575Z]       | ^~~~~~~~~~~~~~~~~~~~~

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might this be a bug in PNG? All usages of this function are now guarded by "PNG_READ_iCCP_SUPPORTED"? It would be useful to report this upstream.

Copy link
Contributor Author

@honkar-jdk honkar-jdk Mar 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In libconfig.h Ln#120 the undef is commented out - /*#undef PNG_READ_iCCP_SUPPORTED*/ but I don't see it defined.

@prrace do we define it in libconfig.h and remove the warning from disabled section in ClientLibraries.gmk? In Updating.txt , I see a note on libconfig.h, it is heavily modified for JDK and a define stmt can be added on need basis (when there are build failures).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrserb I see, what you meant is that the function png_icc_profile_error should be guarded with PNG_READ_iCCP_SUPPORTED instead of PNG_iCCP_SUPPORTED. Reported it to upstream - pnggroup/libpng#668

DISABLED_WARNINGS_clang_splashscreen_impl.c := sign-compare \
unused-but-set-variable unused-function, \
DISABLED_WARNINGS_clang_splashscreen_png.c := \
Expand Down
7 changes: 4 additions & 3 deletions src/java.desktop/share/legal/libpng.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## libpng v1.6.43
## libpng v1.6.47

### libpng License
<pre>
Expand All @@ -9,8 +9,8 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
PNG Reference Library License version 2
---------------------------------------

Copyright (C) 1995-2024 The PNG Reference Library Authors.
Copyright (C) 2018-2024 Cosmin Truta
Copyright (c) 1995-2025 The PNG Reference Library Authors.
Copyright (C) 2018-2025 Cosmin Truta
Copyright (C) 1998-2018 Glenn Randers-Pehrson
Copyright (C) 1996-1997 Andreas Dilger
Copyright (C) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
Expand Down Expand Up @@ -170,6 +170,7 @@ Authors, for copyright and licensing purposes.
* James Yu
* John Bowler
* Kevin Bracey
* Lucas Chollet
* Magnus Holmgren
* Mandar Sahastrabuddhe
* Mans Rullgard
Expand Down
55 changes: 55 additions & 0 deletions src/java.desktop/share/native/libsplashscreen/libpng/CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -6196,6 +6196,61 @@ Version 1.6.43 [February 23, 2024]
consistency verification and text linting.
Added version consistency verification to pngtest.c also.

Version 1.6.44 [September 12, 2024]
Hardened calculations in chroma handling to prevent overflows, and
relaxed a constraint in cHRM validation to accomodate the standard
ACES AP1 set of color primaries.
(Contributed by John Bowler)
Removed the ASM implementation of ARM Neon optimizations and updated
the build accordingly. Only the remaining C implementation shall be
used from now on, thus ensuring the support of the PAC/BTI security
features on ARM64.
(Contributed by Ross Burton and John Bowler)
Fixed the pickup of the PNG_HARDWARE_OPTIMIZATIONS option in the
CMake build on FreeBSD/amd64. This is an important performance fix
on this platform.
Applied various fixes and improvements to the CMake build.
(Contributed by Eric Riff, Benjamin Buch and Erik Scholz)
Added fuzzing targets for the simplified read API.
(Contributed by Mikhail Khachayants)
Fixed a build error involving pngtest.c under a custom config.
This was a regression introduced in a code cleanup in libpng-1.6.43.
(Contributed by Ben Wagner)
Fixed and improved the config files for AppVeyor CI and Travis CI.

Version 1.6.45 [January 7, 2025]
Added support for the cICP chunk.
(Contributed by Lucas Chollet and John Bowler)
Adjusted and improved various checks in colorspace calculations.
(Contributed by John Bowler)
Rearranged the write order of colorspace chunks for better conformance
with the PNG v3 draft specification.
(Contributed by John Bowler)
Raised the minimum required CMake version from 3.6 to 3.14.
Forked off a development branch for libpng version 1.8.

Version 1.6.46 [January 23, 2025]
Added support for the mDCV and cLLI chunks.
(Contributed by John Bowler)
Fixed a build issue affecting C89 compilers.
This was a regression introduced in libpng-1.6.45.
(Contributed by John Bowler)
Added makefile.c89, specifically for testing C89 compilers.
Cleaned up contrib/pngminus: corrected an old typo, removed an old
workaround, and updated the CMake file.

Version 1.6.47 [February 18, 2025]
Modified the behaviour of colorspace chunks in order to adhere
to the new precedence rules formulated in the latest draft of
the PNG Specification.
(Contributed by John Bowler)
Fixed a latent bug in `png_write_iCCP`.
This would have been a read-beyond-end-of-malloc vulnerability,
introduced early in the libpng-1.6.0 development, yet (fortunately!)
it was inaccessible before the above-mentioned modification of the
colorspace precedence rules, due to pre-existing colorspace checks.
(Reported by Bob Friesenhahn; fixed by John Bowler)

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
4 changes: 2 additions & 2 deletions src/java.desktop/share/native/libsplashscreen/libpng/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
PNG Reference Library License version 2
---------------------------------------

* Copyright (c) 1995-2024 The PNG Reference Library Authors.
* Copyright (c) 2018-2024 Cosmin Truta.
* Copyright (c) 1995-2025 The PNG Reference Library Authors.
* Copyright (c) 2018-2025 Cosmin Truta.
* Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
* Copyright (c) 1996-1997 Andreas Dilger.
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
Expand Down
4 changes: 1 addition & 3 deletions src/java.desktop/share/native/libsplashscreen/libpng/README
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
README for libpng version 1.6.43
README for libpng version 1.6.47
================================

See the note about version numbers near the top of `png.h`.
Expand Down Expand Up @@ -157,8 +157,6 @@ Files included in this distribution
"PNG: The Definitive Guide" by Greg Roelofs,
O'Reilly, 1999
libtests/ => Test programs
oss-fuzz/ => Files used by the OSS-Fuzz project for fuzz-testing
libpng
pngexif/ => Program to inspect the EXIF information in PNG files
pngminim/ => Minimal decoder, encoder, and progressive decoder
programs demonstrating the use of pngusr.dfa
Expand Down
Loading