Skip to content

Commit 47ea81f

Browse files
committed
[libpng] Update: v1.6.53 -> v1.6.54
Includes the APNG patch.
1 parent f5c46bc commit 47ea81f

39 files changed

+2208
-1738
lines changed

extlib/libpng/ANNOUNCE

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
libpng 1.6.53 - December 5, 2025
1+
libpng 1.6.54 - January 12, 2026
22
================================
33

44
This is a public release of libpng, intended for use in production code.
@@ -9,10 +9,10 @@ Files available for download
99

1010
Source files:
1111

12-
* libpng-1.6.53.tar.xz (LZMA-compressed, recommended)
13-
* libpng-1.6.53.tar.gz (deflate-compressed)
14-
* lpng1653.7z (LZMA-compressed)
15-
* lpng1653.zip (deflate-compressed)
12+
* libpng-1.6.54.tar.xz (LZMA-compressed, recommended)
13+
* libpng-1.6.54.tar.gz (deflate-compressed)
14+
* lpng1654.7z (LZMA-compressed)
15+
* lpng1654.zip (deflate-compressed)
1616

1717
Other information:
1818

@@ -22,15 +22,16 @@ Other information:
2222
* TRADEMARK.md
2323

2424

25-
Changes from version 1.6.52 to version 1.6.53
25+
Changes from version 1.6.53 to version 1.6.54
2626
---------------------------------------------
2727

28-
* Fixed a build failure on RISC-V RVV caused by a misspelled intrinsic.
29-
(Contributed by Alexander Smorkalov.)
30-
* Fixed a build failure with CMake 4.1 or newer, on Windows, when using
31-
Visual C++ without MASM installed.
32-
(Reported by Andrew Tribick; fixed by Luis Caro Campos.)
33-
28+
* Fixed CVE-2026-22695 (medium severity):
29+
Heap buffer over-read in `png_image_read_direct_scaled.
30+
(Reported and fixed by Petr Simecek.)
31+
* Fixed CVE-2026-22801 (medium severity):
32+
Integer truncation causing heap buffer over-read in `png_image_write_*`.
33+
* Implemented various improvements in oss-fuzz.
34+
(Contributed by Philippe Antoine.)
3435

3536
Send comments/corrections/commendations to png-mng-implement at lists.sf.net.
3637
Subscription is required; visit

extlib/libpng/AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Authors, for copyright and licensing purposes.
2727
* Mike Klein
2828
* Pascal Massimino
2929
* Paul Schmidt
30+
* Petr Simecek
3031
* Philippe Antoine
3132
* Qiang Zhou
3233
* Sam Bushell

extlib/libpng/CHANGES

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6321,6 +6321,16 @@ Version 1.6.53 [December 5, 2025]
63216321
Fixed a build failure with CMake 4.1 or newer, on Windows, when using
63226322
Visual C++ without MASM installed.
63236323

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+
63246334
Send comments/corrections/commendations to png-mng-implement at lists.sf.net.
63256335
Subscription is required; visit
63266336
https://lists.sourceforge.net/lists/listinfo/png-mng-implement

extlib/libpng/CMakeLists.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CMakeLists.txt - CMake lists for libpng
22
#
3-
# Copyright (c) 2018-2025 Cosmin Truta
3+
# Copyright (c) 2018-2026 Cosmin Truta
44
# Copyright (c) 2007-2018 Glenn Randers-Pehrson
55
# Originally written by Christian Ehrlicher, 2007
66
#
@@ -19,7 +19,7 @@
1919

2020
set(PNGLIB_MAJOR 1)
2121
set(PNGLIB_MINOR 6)
22-
set(PNGLIB_REVISION 53)
22+
set(PNGLIB_REVISION 54)
2323
set(PNGLIB_SUBREVISION 0)
2424
#set(PNGLIB_SUBREVISION "git")
2525
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_REVISION})
@@ -984,6 +984,13 @@ if(PNG_TESTS AND PNG_SHARED)
984984
endforeach()
985985
endforeach()
986986

987+
# Regression test:
988+
# Use stride_extra > 32767 to trigger row_bytes > 65535 for linear images.
989+
png_add_test(NAME pngstest-large-stride
990+
COMMAND pngstest
991+
OPTIONS --stride-extra 33000 --tmpfile "large-stride-" --log
992+
FILES "${CMAKE_CURRENT_SOURCE_DIR}/contrib/testpngs/rgb-alpha-16-linear.png")
993+
987994
add_executable(pngunknown ${pngunknown_sources})
988995
target_link_libraries(pngunknown
989996
PRIVATE png_shared)

extlib/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.

extlib/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.53
1+
README for libpng version 1.6.54
22
================================
33

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

extlib/libpng/_MODIFIED_LIBPNG.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
This copy of libpng-1.6.53 is a modified version of the original.
1+
This copy of libpng-1.6.54 is a modified version of the original.
22

3-
commit 4e3f57d50f552841550a36eabbb3fbcecacb7750
4-
Release libpng version 1.6.53
3+
commit 02f2b4f4699f0ef9111a6534f093b53732df4452
4+
Release libpng 1.6.54
55

6-
Tag: v1.6.53
6+
Tag: v1.6.54
77

88
The following changes have been made to the original:
99

@@ -14,5 +14,5 @@ The following changes have been made to the original:
1414
- APNG support has been added via the APNG patch:
1515
http://sourceforge.net/projects/libpng-apng/
1616

17-
To obtain the original libpng-1.6.53, visit:
17+
To obtain the original libpng-1.6.54, visit:
1818
http://www.libpng.org/pub/png/libpng.html

extlib/libpng/arm/filter_neon_intrinsics.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
void
5151
png_read_filter_row_up_neon(png_row_infop row_info, png_bytep row,
52-
png_const_bytep prev_row)
52+
png_const_bytep prev_row)
5353
{
5454
png_bytep rp = row;
5555
png_bytep rp_stop = row + row_info->rowbytes;
@@ -70,7 +70,7 @@ png_read_filter_row_up_neon(png_row_infop row_info, png_bytep row,
7070

7171
void
7272
png_read_filter_row_sub3_neon(png_row_infop row_info, png_bytep row,
73-
png_const_bytep prev_row)
73+
png_const_bytep prev_row)
7474
{
7575
png_bytep rp = row;
7676
png_bytep rp_stop = row + row_info->rowbytes;
@@ -117,7 +117,7 @@ png_read_filter_row_sub3_neon(png_row_infop row_info, png_bytep row,
117117

118118
void
119119
png_read_filter_row_sub4_neon(png_row_infop row_info, png_bytep row,
120-
png_const_bytep prev_row)
120+
png_const_bytep prev_row)
121121
{
122122
png_bytep rp = row;
123123
png_bytep rp_stop = row + row_info->rowbytes;
@@ -149,7 +149,7 @@ png_read_filter_row_sub4_neon(png_row_infop row_info, png_bytep row,
149149

150150
void
151151
png_read_filter_row_avg3_neon(png_row_infop row_info, png_bytep row,
152-
png_const_bytep prev_row)
152+
png_const_bytep prev_row)
153153
{
154154
png_bytep rp = row;
155155
png_const_bytep pp = prev_row;
@@ -217,7 +217,7 @@ png_read_filter_row_avg3_neon(png_row_infop row_info, png_bytep row,
217217

218218
void
219219
png_read_filter_row_avg4_neon(png_row_infop row_info, png_bytep row,
220-
png_const_bytep prev_row)
220+
png_const_bytep prev_row)
221221
{
222222
png_bytep rp = row;
223223
png_bytep rp_stop = row + row_info->rowbytes;
@@ -286,7 +286,7 @@ paeth(uint8x8_t a, uint8x8_t b, uint8x8_t c)
286286

287287
void
288288
png_read_filter_row_paeth3_neon(png_row_infop row_info, png_bytep row,
289-
png_const_bytep prev_row)
289+
png_const_bytep prev_row)
290290
{
291291
png_bytep rp = row;
292292
png_const_bytep pp = prev_row;
@@ -354,7 +354,7 @@ png_read_filter_row_paeth3_neon(png_row_infop row_info, png_bytep row,
354354

355355
void
356356
png_read_filter_row_paeth4_neon(png_row_infop row_info, png_bytep row,
357-
png_const_bytep prev_row)
357+
png_const_bytep prev_row)
358358
{
359359
png_bytep rp = row;
360360
png_bytep rp_stop = row + row_info->rowbytes;

extlib/libpng/contrib/mips-mmi/linux.c

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,14 @@ __asm__(".macro parse_r var r\n\t"
5757

5858
#define HWCAP_LOONGSON_CPUCFG (1 << 14)
5959

60-
static int cpucfg_available(void)
60+
static int
61+
cpucfg_available(void)
6162
{
6263
return getauxval(AT_HWCAP) & HWCAP_LOONGSON_CPUCFG;
6364
}
6465

65-
static int strstart(const char *str, const char *pfx, const char **ptr)
66+
static int
67+
strstart(const char *str, const char *pfx, const char **ptr)
6668
{
6769
while (*pfx && *pfx == *str) {
6870
pfx++;
@@ -74,7 +76,8 @@ static int strstart(const char *str, const char *pfx, const char **ptr)
7476
}
7577

7678
/* Most toolchains have no CPUCFG support yet */
77-
static uint32_t read_cpucfg(uint32_t reg)
79+
static uint32_t
80+
read_cpucfg(uint32_t reg)
7881
{
7982
uint32_t __res;
8083

@@ -94,7 +97,8 @@ static uint32_t read_cpucfg(uint32_t reg)
9497

9598
#define LOONGSON_CFG1_MMI (1 << 4)
9699

97-
static int cpu_flags_cpucfg(void)
100+
static int
101+
cpu_flags_cpucfg(void)
98102
{
99103
int flags = 0;
100104
uint32_t cfg1 = read_cpucfg(LOONGSON_CFG1);
@@ -105,7 +109,8 @@ static int cpu_flags_cpucfg(void)
105109
return flags;
106110
}
107111

108-
static int cpu_flags_cpuinfo(void)
112+
static int
113+
cpu_flags_cpuinfo(void)
109114
{
110115
FILE *f = fopen("/proc/cpuinfo", "r");
111116
char buf[200];
@@ -131,7 +136,8 @@ static int cpu_flags_cpuinfo(void)
131136
return flags;
132137
}
133138

134-
static int png_have_mmi()
139+
static int
140+
png_have_mmi()
135141
{
136142
if (cpucfg_available())
137143
return cpu_flags_cpucfg();

0 commit comments

Comments
 (0)