Skip to content

Commit 96d0eaa

Browse files
jayathirthraoRealCLanger
authored andcommitted
8375063: Update Libpng to 1.6.54
Backport-of: a2e7495 (cherry picked from commit f414153)
1 parent 8f7d1f3 commit 96d0eaa

16 files changed

Lines changed: 1399 additions & 963 deletions

File tree

src/java.desktop/share/legal/libpng.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## libpng v1.6.51
1+
## libpng v1.6.54
22

33
### libpng License
44
<pre>
@@ -9,8 +9,8 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
99
PNG Reference Library License version 2
1010
---------------------------------------
1111

12-
Copyright (C) 1995-2025 The PNG Reference Library Authors.
13-
Copyright (C) 2018-2025 Cosmin Truta
12+
Copyright (C) 1995-2026 The PNG Reference Library Authors.
13+
Copyright (C) 2018-2026 Cosmin Truta
1414
Copyright (C) 1998-2018 Glenn Randers-Pehrson
1515
Copyright (C) 1996-1997 Andreas Dilger
1616
Copyright (C) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
@@ -158,6 +158,7 @@ This is the list of PNG Reference Library ("libpng") Contributing
158158
Authors, for copyright and licensing purposes.
159159
160160
* Adam Richter
161+
* Alexander Smorkalov
161162
* Andreas Dilger
162163
* Chris Blume
163164
* Cosmin Truta
@@ -179,6 +180,7 @@ Authors, for copyright and licensing purposes.
179180
* Mike Klein
180181
* Pascal Massimino
181182
* Paul Schmidt
183+
* Petr Simecek
182184
* Philippe Antoine
183185
* Qiang Zhou
184186
* Sam Bushell
@@ -209,6 +211,8 @@ Authors, for copyright and licensing purposes.
209211
- ZhangLixia (张利霞)
210212
* Samsung Group
211213
- Filip Wasil
214+
* SpacemiT Hangzhou Technology, Co.
215+
- Liang Junzhao (梁俊钊)
212216
213217
The build projects, the build scripts, the test scripts, and other
214218
files in the "projects", "scripts" and "tests" directories, have

src/java.desktop/share/native/libsplashscreen/libpng/CHANGES

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6304,6 +6304,33 @@ Version 1.6.51 [November 21, 2025]
63046304
Added GitHub Actions workflows for automated testing.
63056305
Performed various refactorings and cleanups.
63066306

6307+
Version 1.6.52 [December 3, 2025]
6308+
Fixed CVE-2025-66293 (high severity):
6309+
Out-of-bounds read in `png_image_read_composite`.
6310+
(Reported by flyfish101 <[email protected]>.)
6311+
Fixed the Paeth filter handling in the RISC-V RVV implementation.
6312+
(Reported by Filip Wasil; fixed by Liang Junzhao.)
6313+
Improved the performance of the RISC-V RVV implementation.
6314+
(Contributed by Liang Junzhao.)
6315+
Added allocation failure fuzzing to oss-fuzz.
6316+
(Contributed by Philippe Antoine.)
6317+
6318+
Version 1.6.53 [December 5, 2025]
6319+
Fixed a build failure on RISC-V RVV caused by a misspelled intrinsic.
6320+
(Contributed by Alexander Smorkalov.)
6321+
Fixed a build failure with CMake 4.1 or newer, on Windows, when using
6322+
Visual C++ without MASM installed.
6323+
6324+
Version 1.6.54 [January 12, 2026]
6325+
Fixed CVE-2026-22695 (medium severity):
6326+
Heap buffer over-read in `png_image_read_direct_scaled.
6327+
(Reported and fixed by Petr Simecek.)
6328+
Fixed CVE-2026-22801 (medium severity):
6329+
Integer truncation causing heap buffer over-read in `png_image_write_*`.
6330+
Implemented various improvements in oss-fuzz.
6331+
(Contributed by Philippe Antoine.)
6332+
6333+
63076334
Send comments/corrections/commendations to png-mng-implement at lists.sf.net.
63086335
Subscription is required; visit
63096336
https://lists.sourceforge.net/lists/listinfo/png-mng-implement

src/java.desktop/share/native/libsplashscreen/libpng/LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
44
PNG Reference Library License version 2
55
---------------------------------------
66

7-
* Copyright (c) 1995-2025 The PNG Reference Library Authors.
8-
* Copyright (c) 2018-2025 Cosmin Truta.
7+
* Copyright (c) 1995-2026 The PNG Reference Library Authors.
8+
* Copyright (c) 2018-2026 Cosmin Truta.
99
* Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
1010
* Copyright (c) 1996-1997 Andreas Dilger.
1111
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.

src/java.desktop/share/native/libsplashscreen/libpng/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
README for libpng version 1.6.51
1+
README for libpng version 1.6.54
22
================================
33

44
See the note about version numbers near the top of `png.h`.

src/java.desktop/share/native/libsplashscreen/libpng/png.c

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* However, the following notice accompanied the original version of this
3030
* file and, per its terms, should not be removed:
3131
*
32-
* Copyright (c) 2018-2025 Cosmin Truta
32+
* Copyright (c) 2018-2026 Cosmin Truta
3333
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
3434
* Copyright (c) 1996-1997 Andreas Dilger
3535
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
@@ -42,7 +42,7 @@
4242
#include "pngpriv.h"
4343

4444
/* Generate a compiler error if there is an old png.h in the search path. */
45-
typedef png_libpng_version_1_6_51 Your_png_h_is_not_version_1_6_51;
45+
typedef png_libpng_version_1_6_54 Your_png_h_is_not_version_1_6_54;
4646

4747
/* Sanity check the chunks definitions - PNG_KNOWN_CHUNKS from pngpriv.h and the
4848
* corresponding macro definitions. This causes a compile time failure if
@@ -130,7 +130,8 @@ png_sig_cmp(png_const_bytep sig, size_t start, size_t num_to_check)
130130
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
131131
/* Function to allocate memory for zlib */
132132
PNG_FUNCTION(voidpf /* PRIVATE */,
133-
png_zalloc,(voidpf png_ptr, uInt items, uInt size),PNG_ALLOCATED)
133+
png_zalloc,(voidpf png_ptr, uInt items, uInt size),
134+
PNG_ALLOCATED)
134135
{
135136
png_alloc_size_t num_bytes = size;
136137

@@ -286,7 +287,8 @@ png_user_version_check(png_structrp png_ptr, png_const_charp user_png_ver)
286287
PNG_FUNCTION(png_structp /* PRIVATE */,
287288
png_create_png_struct,(png_const_charp user_png_ver, png_voidp error_ptr,
288289
png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,
289-
png_malloc_ptr malloc_fn, png_free_ptr free_fn),PNG_ALLOCATED)
290+
png_malloc_ptr malloc_fn, png_free_ptr free_fn),
291+
PNG_ALLOCATED)
290292
{
291293
png_struct create_struct;
292294
# ifdef PNG_SETJMP_SUPPORTED
@@ -390,7 +392,8 @@ png_create_png_struct,(png_const_charp user_png_ver, png_voidp error_ptr,
390392

391393
/* Allocate the memory for an info_struct for the application. */
392394
PNG_FUNCTION(png_infop,PNGAPI
393-
png_create_info_struct,(png_const_structrp png_ptr),PNG_ALLOCATED)
395+
png_create_info_struct,(png_const_structrp png_ptr),
396+
PNG_ALLOCATED)
394397
{
395398
png_inforp info_ptr;
396399

@@ -846,8 +849,8 @@ png_get_copyright(png_const_structrp png_ptr)
846849
return PNG_STRING_COPYRIGHT
847850
#else
848851
return PNG_STRING_NEWLINE \
849-
"libpng version 1.6.51" PNG_STRING_NEWLINE \
850-
"Copyright (c) 2018-2025 Cosmin Truta" PNG_STRING_NEWLINE \
852+
"libpng version 1.6.54" PNG_STRING_NEWLINE \
853+
"Copyright (c) 2018-2026 Cosmin Truta" PNG_STRING_NEWLINE \
851854
"Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson" \
852855
PNG_STRING_NEWLINE \
853856
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
@@ -2286,8 +2289,8 @@ png_check_fp_number(png_const_charp string, size_t size, int *statep,
22862289
int
22872290
png_check_fp_string(png_const_charp string, size_t size)
22882291
{
2289-
int state=0;
2290-
size_t char_index=0;
2292+
int state = 0;
2293+
size_t char_index = 0;
22912294

22922295
if (png_check_fp_number(string, size, &state, &char_index) != 0 &&
22932296
(char_index == size || string[char_index] == 0))

0 commit comments

Comments
 (0)