Skip to content
Merged
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
10 changes: 3 additions & 7 deletions make/autoconf/flags.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -128,16 +128,12 @@ AC_DEFUN([FLAGS_SETUP_MACOSX_VERSION],
# The expected format for <version> is either nn.n.n or nn.nn.nn. See
# /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/AvailabilityVersions.h
# MACOSX_VERSION_MIN specifies the lowest version of Macosx that the built
# MACOSX_VERSION_MIN specifies the lowest version of macOS that the built
# binaries should be compatible with, even if compiled on a newer version
# of the OS. It currently has a hard coded value. Setting this also limits
# exposure to API changes in header files. Bumping this is likely to
# require code changes to build.
if test "x$OPENJDK_TARGET_CPU_ARCH" = xaarch64; then
MACOSX_VERSION_MIN=11.00.00
else
MACOSX_VERSION_MIN=10.12.0
fi
MACOSX_VERSION_MIN=11.00.00
MACOSX_VERSION_MIN_NODOTS=${MACOSX_VERSION_MIN//\./}
AC_SUBST(MACOSX_VERSION_MIN)
Expand Down
2 changes: 1 addition & 1 deletion make/conf/jib-profiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ var getJibProfilesProfiles = function (input, common, data) {
target_cpu: "x64",
dependencies: ["devkit", "gtest", "pandoc"],
configure_args: concat(common.configure_args_64bit, "--with-zlib=system",
"--with-macosx-version-max=10.12.00",
"--with-macosx-version-max=11.00.00",
"--enable-compatible-cds-alignment",
// Use system SetFile instead of the one in the devkit as the
// devkit one may not work on Catalina.
Expand Down
15 changes: 1 addition & 14 deletions make/modules/java.desktop/lib/Awt2dLibraries.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -870,19 +870,6 @@ endif

################################################################################

# MACOSX_METAL_VERSION_MIN specifies the lowest version of Macosx
# that should be used to compile Metal shaders. We support Metal
# pipeline only on Macosx >=10.14. For Macosx versions <10.14 even if
# we enable Metal pipeline using -Dsun.java2d.metal=true, at
# runtime we force it to use OpenGL pipeline. And MACOSX_VERSION_MIN
# for aarch64 has always been >10.14 so we use continue to use
# MACOSX_VERSION_MIN for aarch64.
ifeq ($(OPENJDK_TARGET_CPU_ARCH), xaarch64)
MACOSX_METAL_VERSION_MIN=$(MACOSX_VERSION_MIN)
else
MACOSX_METAL_VERSION_MIN=10.14.0
endif

ifeq ($(call isTargetOs, macosx), true)
SHADERS_SRC := $(TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/shaders.metal
SHADERS_SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/native/java.desktop/libosxui
Expand All @@ -895,7 +882,7 @@ ifeq ($(call isTargetOs, macosx), true)
OUTPUT_FILE := $(SHADERS_AIR), \
SUPPORT_DIR := $(SHADERS_SUPPORT_DIR), \
COMMAND := $(METAL) -c -std=osx-metal2.0 \
-mmacosx-version-min=$(MACOSX_METAL_VERSION_MIN) \
-mmacosx-version-min=$(MACOSX_VERSION_MIN) \
-o $(SHADERS_AIR) $(SHADERS_SRC), \
))

Expand Down
12 changes: 9 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.47
## libpng v1.6.51

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

Copyright (c) 1995-2025 The PNG Reference Library Authors.
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
Expand Down Expand Up @@ -173,6 +173,7 @@ Authors, for copyright and licensing purposes.
* Lucas Chollet
* Magnus Holmgren
* Mandar Sahastrabuddhe
* Manfred Schlaegl
* Mans Rullgard
* Matt Sarett
* Mike Klein
Expand All @@ -184,6 +185,7 @@ Authors, for copyright and licensing purposes.
* Samuel Williams
* Simon-Pierre Cadieux
* Tim Wegner
* Tobias Stoeckmann
* Tom Lane
* Tom Tanner
* Vadim Barkov
Expand All @@ -193,8 +195,9 @@ Authors, for copyright and licensing purposes.
- Zixu Wang (王子旭)
* Arm Holdings
- Richard Townsend
* Google Inc.
* Google LLC
- Dan Field
- Dragoș Tiselice
- Leon Scroggins III
- Matt Sarett
- Mike Klein
Expand All @@ -204,6 +207,8 @@ Authors, for copyright and licensing purposes.
- GuXiWei (顾希伟)
- JinBo (金波)
- ZhangLixia (张利霞)
* Samsung Group
- Filip Wasil

The build projects, the build scripts, the test scripts, and other
files in the "projects", "scripts" and "tests" directories, have
Expand All @@ -214,3 +219,4 @@ of the tools-generated files that are distributed with libpng, have
other copyright owners, and are released under other open source
licenses.
```

53 changes: 53 additions & 0 deletions src/java.desktop/share/native/libsplashscreen/libpng/CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -6251,6 +6251,59 @@ Version 1.6.47 [February 18, 2025]
colorspace precedence rules, due to pre-existing colorspace checks.
(Reported by Bob Friesenhahn; fixed by John Bowler)

Version 1.6.48 [April 30, 2025]
Fixed the floating-point version of the mDCv setter `png_set_mDCv`.
(Reported by Mohit Bakshi; fixed by John Bowler)
Added #error directives to discourage the inclusion of private
libpng implementation header files in PNG-supporting applications.
Added the CMake build option `PNG_LIBCONF_HEADER`, to be used as an
alternative to `DFA_XTRA`.
Removed the Travis CI configuration files, with heartfelt thanks for
their generous support of our project over the past five years!

Version 1.6.49 [June 12, 2025]
Added SIMD-optimized code for the RISC-V Vector Extension (RVV).
(Contributed by Manfred Schlaegl, Dragos Tiselice and Filip Wasil)
Added various fixes and improvements to the build scripts and to
the sample code.

Version 1.6.50 [July 1, 2025]
Improved the detection of the RVV Extension on the RISC-V platform.
(Contributed by Filip Wasil)
Replaced inline ASM with C intrinsics in the RVV code.
(Contributed by Filip Wasil)
Fixed a decoder defect in which unknown chunks trailing IDAT, set
to go through the unknown chunk handler, incorrectly triggered
out-of-place IEND errors.
(Contributed by John Bowler)
Fixed the CMake file for cross-platform builds that require `libm`.

Version 1.6.51 [November 21, 2025]
Fixed CVE-2025-64505 (moderate severity):
Heap buffer overflow in `png_do_quantize` via malformed palette index.
(Reported by Samsung; analyzed by Fabio Gritti.)
Fixed CVE-2025-64506 (moderate severity):
Heap buffer over-read in `png_write_image_8bit` with 8-bit input and
`convert_to_8bit` enabled.
(Reported by Samsung and <[email protected]>;
analyzed by Fabio Gritti.)
Fixed CVE-2025-64720 (high severity):
Buffer overflow in `png_image_read_composite` via incorrect palette
premultiplication.
(Reported by Samsung; analyzed by John Bowler.)
Fixed CVE-2025-65018 (high severity):
Heap buffer overflow in `png_combine_row` triggered via
`png_image_finish_read`.
(Reported by <[email protected]>.)
Fixed a memory leak in `png_set_quantize`.
(Reported by Samsung; analyzed by Fabio Gritti.)
Removed the experimental and incomplete ERROR_NUMBERS code.
(Contributed by Tobias Stoeckmann.)
Improved the RISC-V vector extension support; required RVV 1.0 or newer.
(Contributed by Filip Wasil.)
Added GitHub Actions workflows for automated testing.
Performed various refactorings and cleanups.

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: 3 additions & 1 deletion 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.47
README for libpng version 1.6.51
================================

See the note about version numbers near the top of `png.h`.
Expand Down Expand Up @@ -147,6 +147,7 @@ Files included in this distribution
loongarch/ => Optimized code for LoongArch LSX
mips/ => Optimized code for MIPS MSA and MIPS MMI
powerpc/ => Optimized code for PowerPC VSX
riscv/ => Optimized code for the RISC-V platform
ci/ => Scripts for continuous integration
contrib/ => External contributions
arm-neon/ => Optimized code for the ARM-NEON platform
Expand All @@ -162,6 +163,7 @@ Files included in this distribution
programs demonstrating the use of pngusr.dfa
pngminus/ => Simple pnm2png and png2pnm programs
pngsuite/ => Test images
riscv-rvv/ => Optimized code for the RISC-V Vector platform
testpngs/ => Test images
tools/ => Various tools
visupng/ => VisualPng, a Windows viewer for PNG images
Expand Down
28 changes: 14 additions & 14 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_47 Your_png_h_is_not_version_1_6_47;
typedef png_libpng_version_1_6_51 Your_png_h_is_not_version_1_6_51;

/* 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 @@ -137,10 +137,16 @@ png_zalloc,(voidpf png_ptr, uInt items, uInt size),PNG_ALLOCATED)
if (png_ptr == NULL)
return NULL;

if (items >= (~(png_alloc_size_t)0)/size)
/* This check against overflow is vestigial, dating back from
* the old times when png_zalloc used to be an exported function.
* We're still keeping it here for now, as an extra-cautious
* prevention against programming errors inside zlib, although it
* should rather be a debug-time assertion instead.
*/
if (size != 0 && items >= (~(png_alloc_size_t)0) / size)
{
png_warning (png_voidcast(png_structrp, png_ptr),
"Potential overflow in png_zalloc()");
png_warning(png_voidcast(png_structrp, png_ptr),
"Potential overflow in png_zalloc()");
return NULL;
}

Expand Down Expand Up @@ -267,10 +273,6 @@ png_user_version_check(png_structrp png_ptr, png_const_charp user_png_ver)
png_warning(png_ptr, m);
#endif

#ifdef PNG_ERROR_NUMBERS_SUPPORTED
png_ptr->flags = 0;
#endif

return 0;
}

Expand Down Expand Up @@ -729,7 +731,7 @@ png_get_io_ptr(png_const_structrp png_ptr)
* function of your own because "FILE *" isn't necessarily available.
*/
void PNGAPI
png_init_io(png_structrp png_ptr, png_FILE_p fp)
png_init_io(png_structrp png_ptr, FILE *fp)
{
png_debug(1, "in png_init_io");

Expand Down Expand Up @@ -844,7 +846,7 @@ png_get_copyright(png_const_structrp png_ptr)
return PNG_STRING_COPYRIGHT
#else
return PNG_STRING_NEWLINE \
"libpng version 1.6.47" PNG_STRING_NEWLINE \
"libpng version 1.6.51" PNG_STRING_NEWLINE \
"Copyright (c) 2018-2025 Cosmin Truta" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson" \
PNG_STRING_NEWLINE \
Expand Down Expand Up @@ -1520,7 +1522,7 @@ png_XYZ_from_xy(png_XYZ *XYZ, const png_xy *xy)
}
#endif /* COLORSPACE */

#ifdef PNG_iCCP_SUPPORTED
#ifdef PNG_READ_iCCP_SUPPORTED
/* Error message generation */
static char
png_icc_tag_char(png_uint_32 byte)
Expand Down Expand Up @@ -1596,9 +1598,7 @@ png_icc_profile_error(png_const_structrp png_ptr, png_const_charp name,

return 0;
}
#endif /* iCCP */

#ifdef PNG_READ_iCCP_SUPPORTED
/* Encoded value of D50 as an ICC XYZNumber. From the ICC 2010 spec the value
* is XYZ(0.9642,1.0,0.8249), which scales to:
*
Expand Down Expand Up @@ -3998,7 +3998,7 @@ png_image_free_function(png_voidp argument)
# ifdef PNG_STDIO_SUPPORTED
if (cp->owned_file != 0)
{
FILE *fp = png_voidcast(FILE*, cp->png_ptr->io_ptr);
FILE *fp = png_voidcast(FILE *, cp->png_ptr->io_ptr);
cp->owned_file = 0;

/* Ignore errors here. */
Expand Down
Loading
Loading