Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
273 commits
Select commit Hold shift + click to select a range
9e53875
arm: Remove obsolete assembler implementation filter_neon.S
rossburton Dec 14, 2023
e4a31f0
arm: Add a placeholder file in lieu of the former `filter_neon.S`
ctruta Jun 17, 2024
532fec0
ci: Fix the verification of the msys2 toolchain on AppVeyor CI
ctruta Sep 3, 2024
33ef48b
cmake: Fix the handling of PNG_HARDWARE_OPTIMIZATIONS on FreeBSD/amd64
ctruta Sep 4, 2024
43d6ad3
cmake: Honor CMAKE_SYSROOT if set
ericriff Sep 4, 2024
7e18d14
ci: Add the targets/ subdirectory to facilitate cross-platform testing
ctruta Sep 5, 2024
20f819c
fix: Remove cHRM check to accomodate ACES AP1
jbowler Sep 4, 2024
40878fd
fix: Restore STDERR in pngtest.c
bungeman Apr 26, 2024
2220865
chore: Pacify editorconfig-checker version 3.0
ctruta Sep 8, 2024
fcdec9c
chore: Delete contrib/tools/chkfmt.sh
ctruta Sep 8, 2024
53a7f4e
ci: Simplify the Travis CI configuration matrix
ctruta Sep 8, 2024
0e204b7
build: Add a CMake config file compatible with the FindPNG module
bebuch Mar 1, 2024
68ba4f1
oss-fuzz: Add fuzzing targets for simplified READ API
tyler92 Jul 2, 2024
1964d56
Deprecate PNGARG and remove all of its remaining uses
ctruta Sep 10, 2024
1d1cc9a
cmake: Fix an error in the declaration of target include directories
Green-Sky Apr 17, 2024
843dbb7
Revert "cmake: Fix an error in the declaration of target include dire…
ctruta Sep 10, 2024
8cc22a8
cmake: Fix an error in the declaration of target include directories
Green-Sky Apr 17, 2024
5a7e87f
fix: Prevent overflow in chromaticity calculations
jbowler Sep 11, 2024
3117b5f
oss-fuzz: Update the README file, the Docker file and the build script
ctruta Sep 12, 2024
88ab4f5
chore: Rerun `./autogen.sh --maintainer`
ctruta Sep 12, 2024
f5e92d7
Release libpng version 1.6.44
ctruta Sep 12, 2024
ef153d5
Bump version to 1.6.45.git
ctruta Sep 14, 2024
b7276ec
oss-fuzz: Transfer to an external repo and remove from this repo
ctruta Sep 14, 2024
e3c7b26
ci: Fix bad (but innocuous) copy pasta in ci_verify_version.sh
ctruta Sep 14, 2024
222dd7c
doc: Make a small correction about branches in the libpng manual
ctruta Sep 14, 2024
c0f3dd4
doc: Update the README and TODO files
ctruta Sep 14, 2024
68d7ce8
ci: Get ready for the upcoming branch 'libpng18'
ctruta Sep 14, 2024
18ab7d0
[libpng16] chore: Reorganize and update .gitignore
ctruta Sep 15, 2024
cb08862
[libpng16] chore: Set the `indent_size` fields in .editorconfig
ctruta Sep 15, 2024
bcb3124
[libpng16] ci: Update ci_lint.sh to recognize .editorconfig-checker.json
ctruta Sep 17, 2024
cd5e582
Revert "oss-fuzz: Transfer to an external repo and remove from this r…
ctruta Sep 19, 2024
529e69e
Revert "oss-fuzz: Update the README file, the Docker file and the bui…
ctruta Sep 19, 2024
b8a0a54
[libpng16] test: Fix "make check" in all branches beyond 'libpng16'
jbowler Sep 15, 2024
b3bcbf9
[libpng16] projects: Adjust settings in the Visual Studio project
ctruta Sep 23, 2024
d161ce6
[libpng16] projects: Add a build launcher to the Visual Studio project
ctruta Sep 23, 2024
f3a45ac
[libpng16] chore: Update .gitignore
ctruta Sep 24, 2024
65cd5fa
ci: Fix the configuration for Travis CI and AppVeyor CI
ctruta Sep 24, 2024
0a27b48
[libpng16] mips: Eliminate use of non-ISO-C90 features
jbowler Sep 23, 2024
d288a1d
fix: Adjust colorspace calculations for ACES AP0
jbowler Sep 17, 2024
d3cf9b6
[libpng16] arm: Use `png_aligncastconst` for an upcast in Neon intrin…
jbowler Sep 26, 2024
642b5d8
[libpng16] build: Raise the minimum required CMake version to 3.14
ctruta Sep 14, 2024
9ee8238
[libpng16] test: Tidy up the logging of test program arguments in CTest
ctruta Oct 6, 2024
1bf304c
[libpng16] ci: Use modern CMake command options in ci_verify_cmake.sh
ctruta Oct 6, 2024
7c90057
[libpng16] ci: Verification should pass regardless of autoconf artifacts
ctruta Oct 7, 2024
f14d5fc
[libpng16] fix: Correct the function `png_fp_sub` in png.c
jbowler Oct 10, 2024
d7d950e
[libpng16] chore: Clean up the leading blank lines from all source files
jbowler Oct 10, 2024
a7a8fae
[libpng16] style: Add a cmake-format config file and satisfy cmake-lint
ctruta Oct 11, 2024
8b1d489
[libpng16] style: Resolve the remaining warnings issued by cmake-lint
ctruta Oct 12, 2024
65470ac
fix: Avoid integer overflows in function `png_xy_from_XYZ`
jbowler Oct 12, 2024
76e5ec2
[libpng16] test: Add a compile-time check in pngimage.c to avoid a fa…
jbowler Oct 14, 2024
d9d70e6
[libpng16] refactor: Deduplicate the interlace arrays `png_pass_*`
ctruta Oct 17, 2024
c1cc0f3
[libpng16] build: Rename a private function to benefit C++Builder
ctruta Oct 18, 2024
6f786ff
Update the copyright year
ctruta Jan 2, 2025
75748d9
[libpng16] Add support for reading and writing the cICP chunk
LucasChollet Jun 22, 2024
823c2d8
[libpng16] fix: Update the cICP support for better compliance with PNG-3
ctruta Dec 31, 2024
4599354
[libpng16] test: Move cicp-display-p3_reencoded.png to contrib/testpn…
ctruta Oct 6, 2024
3042f74
[libpng16] fix: Update the cICP implementation yet more
ctruta Jan 2, 2025
0cc367a
[libpng16] fix: Write order of colourspace chunks should conform to P…
jbowler Jan 3, 2025
2a845ff
build: Move portions from the main CMake file to separate modules
ctruta Jan 6, 2025
3714c58
chore: Rerun `./autogen.sh --maintainer`
ctruta Jan 6, 2025
51f5bd6
Release libpng version 1.6.45
ctruta Jan 7, 2025
8ffc967
Bump version to 1.6.46.git
ctruta Jan 8, 2025
92e8581
api(PNGv3): Add support for mDCV and cLLI
jbowler Jan 4, 2025
f753baa
api(PNGv3): Update the generated files and `PNG_EXPORT_LAST_ORDINAL`
jbowler Jan 4, 2025
03660a5
pngminus: Add .editorconfig file; update the CMake file
ctruta Jan 10, 2025
8a28d05
pngminus: Fix a typo in png2pnm.c
ctruta Jan 10, 2025
19a5a5e
pngminus: Remove a workaround for an old printer
ctruta Jan 10, 2025
4d7c993
fix: Restore the build for strictly-conforming standard compilers
jbowler Jan 20, 2025
36a16fd
build: Add scripts/makefile.c89; update other makefiles
ctruta Jan 21, 2025
9cc729b
build: Update scripts/makefile.*
ctruta Jan 21, 2025
deadeea
chore: Fix a typo in Makefile.am; rerun `./autogen.sh --maintainer`
ctruta Jan 22, 2025
fcb0bca
chore: Update the .editorconfig file; add/update README files
ctruta Jan 22, 2025
0024abd
Release libpng version 1.6.46
ctruta Jan 23, 2025
171bdd3
Bump version to 1.6.47.git
ctruta Jan 27, 2025
a8242dd
PNGv3 colourspace precedence rules conformance
jbowler Jan 26, 2025
c4b20d0
test: add configuration tests and fix bugs
jbowler Jan 27, 2025
2519a03
refactor: Clean up the checking of chunk lengths and allocation limits
jbowler Jan 29, 2025
8c7ed2e
fix: Typo in a preprocessor directive
ctruta Jan 30, 2025
68e090e
fix: `png_write_iCCP` check on profile length
jbowler Jan 30, 2025
812c34c
test: add limit configuration tests
jbowler Jan 31, 2025
5356b94
Update man page to latest PNG 3e draft
svgeesus Feb 11, 2025
b20e6fb
pngimage: clean up on user/internal errors
jbowler Feb 13, 2025
bb7e922
ci: Introduce the `CI_NO_BUILD` flag
ctruta Feb 17, 2025
872555f
Release libpng version 1.6.47
ctruta Feb 18, 2025
5d09501
Bump version to 1.6.48.git
ctruta Feb 19, 2025
f20e66a
chore: Apply some of the missed updates to the copyright year
ctruta Feb 19, 2025
738f5e7
ci: Add more checks to ci_verify_version.sh; refactor
ctruta Feb 20, 2025
044536d
[libpng18] chore: Clean up remnants of the long-discontinued Win16 su…
ctruta Feb 21, 2025
44f97f0
[libpng18] chore: Clean up the `FILE *` formulations in code and in d…
ctruta Feb 21, 2025
34005e3
Recover from errors in ancillary chunks
LucasChollet Mar 3, 2025
e046c0d
Revert "Recover from errors in ancillary chunks"
ctruta Apr 22, 2025
7101a55
Correct mistake in example.c
ProgramMax Apr 8, 2025
f2b0f5f
fix(mDCv): Correct the floating-point setter `png_set_mDCv`
jbowler Apr 19, 2025
98448e3
Remove unused function from write-only configurations
jbowler Apr 19, 2025
c904917
Discourage the inclusion of private headers outside libpng
ctruta Apr 25, 2025
69a3e5b
chore: Clean up the error directives
ctruta Apr 25, 2025
23bdc7a
build: Add the CMake build option `PNG_LIBCONF_HEADER`
ctruta Apr 28, 2025
3e67531
chore: Add a TODO note in .cmake-format.yaml; reformat CMakeLists.txt
ctruta Apr 29, 2025
34e3f7a
Remove the config for Travis CI (and thank them for their support!)
ctruta Apr 30, 2025
643dbda
doc: Update the png.5 man page to the latest PNG-3 draft specification
ctruta Apr 30, 2025
ea12796
Release libpng version 1.6.48
ctruta Apr 30, 2025
b4800ba
Bump version to 1.6.49.git
ctruta May 1, 2025
cc5ee6b
Add optimized RISC-V Vector functions
dragostis May 2, 2023
ffb8e8b
Fix and improve the RISC-V Vector (RVV) implementation
filipwasil Mar 11, 2025
2b0eb78
riscv: Fix autotools definitions and comments
filipwasil May 5, 2025
7108843
riscv: Fix the run-time checking of the RVV availability
filipwasil May 8, 2025
0e37c0b
riscv: Fix more comments
filipwasil May 14, 2025
611bf10
riscv: autotools update
filipwasil May 19, 2025
5be32eb
chore: Rerun `./autogen.sh --maintainer`
ctruta May 26, 2025
cff8620
chore: Add riscv/.editorconfig and pacify editorconfig-checker
ctruta May 27, 2025
e2c1579
ci: Add action-editorconfig-checker to the GitHub Action for linting
ctruta May 28, 2025
dc71f48
build: Fix apple-non-apple cross building
joostn Feb 26, 2025
5631b9b
build: Implement various improvements to the CMake file
ctruta May 29, 2025
f04c457
build: Remove the PNG_DEBUG option from CMake files and project files
ctruta May 29, 2025
0cc6436
build: Repair and reduce the CMake build dependency graph
ctruta May 29, 2025
197bbfe
examples: Fix file descriptor leak in iccfrompng.c by closing input file
sanjay20m May 31, 2025
3bca02e
examples: Refactor and reformat using clang-format
ctruta Jun 1, 2025
a5830bf
build: Fix the detection of the math library in the CMake file
ctruta Jun 11, 2025
5b62726
riscv: Fix autodetection of RVV support
filipwasil Jun 12, 2025
5d53dfd
chore: Rerun `./autogen.sh --maintainer`
ctruta Jun 12, 2025
740366c
doc: Update the png.5 man page to the latest PNG-3 draft
ctruta Jun 12, 2025
6402042
Release libpng version 1.6.49
ctruta Jun 12, 2025
7084241
Bump version to 1.6.50.git
ctruta Jun 14, 2025
5dc5937
chore: Update .gitignore
ctruta Jun 14, 2025
edf4662
riscv: Improve the RVV availability check
filipwasil Jun 17, 2025
be81ebe
chore: Rerun `./autogen.sh --maintainer`
ctruta Jun 17, 2025
21895b0
riscv: Clearly separate the build flow for autotools and cmake
filipwasil Jun 17, 2025
3391bb9
riscv: Use C intrinsics
filipwasil Jun 26, 2025
6aa47de
riscv: Do not overwrite `-march` when testing against SIMD availability
filipwasil Jun 26, 2025
f451a4d
riscv: Simplify the runtime check to always be present
filipwasil Jun 27, 2025
4266c75
riscv: Remove unused argument
filipwasil Jun 28, 2025
2e5f296
fix: Prevent unknown chunks from causing out-of-place IEND errors
jbowler Jun 24, 2025
8087a21
build: Fix the CMake file for cross-platform builds that require `libm`
ctruta Jun 30, 2025
9eb25bd
chore: Rerun `./autogen.sh --maintainer`
ctruta Jun 30, 2025
254a64e
doc: Update the man pages to the final PNG-3 specification
ctruta Jul 1, 2025
2b97891
Release libpng version 1.6.50
ctruta Jul 1, 2025
cf59edd
Bump version to 1.6.51.git
ctruta Jul 2, 2025
7cecdca
Harden a vestigial check against overflow inside `png_zalloc`
ctruta Jul 3, 2025
7916eb7
riscv: Support only RVV 1.0
filipwasil Jul 7, 2025
816b008
riscv: Leverage `__riscv_v` in pngpriv.h
filipwasil Jul 8, 2025
8fb19f2
doc: Update and reorganize the png.5 man page
ctruta Jul 14, 2025
134ab61
chore: Update .gitignore
ctruta Jul 17, 2025
e4e25f2
ci: Add GitHub Actions for verifying libpng on Linux, macOS and Windows
ctruta Sep 1, 2025
27de46c
ci: Run autogen.sh without `--maintainer` in ci_verify_configure.sh
ctruta Sep 1, 2025
99230a0
refactor: Delete conditional compilation for libpng 1.6.0 or earlier
ctruta Sep 3, 2025
c6913e2
chore: Update .gitignore to exclude local coding agent files
ctruta Sep 29, 2025
bd41aa6
api! Remove the experimental (and incomplete) ERROR_NUMBERS code
stoeckmann Sep 29, 2025
2bd84c0
Fix a heap buffer overflow in `png_write_image_8bit`
ctruta Nov 7, 2025
ea09476
Fix a memory leak in function `png_set_quantize`; refactor
ctruta Nov 8, 2025
6a528eb
Fix a buffer overflow in `png_do_quantize`
ctruta Nov 8, 2025
83b23a8
refactor: Delete unreachable code from `png_do_read_transformations`
ctruta Nov 10, 2025
08da33b
Fix a buffer overflow in `png_init_read_transformations`
ctruta Nov 12, 2025
16b5e38
Fix a buffer overflow in `png_image_finish_read`
ctruta Nov 17, 2025
218612d
Rearchitect the fix to the buffer overflow in `png_image_finish_read`
ctruta Nov 19, 2025
3a3d485
riscv: Fix `-Wundef` compiler warnings and relax RVV version checks
ctruta Nov 21, 2025
728ac12
chore: Update .gitignore to exclude more local files
ctruta Nov 21, 2025
c53a323
chore: Disable automatic charset detection in .editorconfig-checker
ctruta Nov 21, 2025
b7fc38c
ci: Update the branch and tag exclusions on AppVeyor CI
ctruta Nov 21, 2025
fe85570
chore: Rerun `./autogen.sh --maintainer`
ctruta Nov 21, 2025
869ed49
Update the main AUTHORS file
ctruta Nov 21, 2025
49363ad
Release libpng version 1.6.51
ctruta Nov 21, 2025
cf53e54
Bump version to 1.6.52.git
ctruta Nov 28, 2025
788a624
Fix an out-of-bounds read in `png_image_read_composite`
ctruta Nov 28, 2025
a05a48b
Finalize the fix for out-of-bounds read in `png_image_read_composite`
ctruta Dec 1, 2025
87ed1cd
riscv: Improve averaging performance in `png_read_filter_row_avg_rvv`
Dec 1, 2025
d27bedd
riscv: Fix undefined behavior in `png_read_filter_row_paeth_rvv`
Dec 2, 2025
5b159ae
riscv: Reformat the contributor list and update the AUTHORS file
ctruta Dec 3, 2025
5c7d02d
oss-fuzz: Add allocation failure fuzzing via nalloc
catenacyber Nov 21, 2025
fbed161
Release libpng version 1.6.52
ctruta Dec 3, 2025
d7447f0
Bump version to 1.6.53.git
ctruta Dec 5, 2025
d1ec152
Refer to CVE-2025-66293 in a comment about a vulnerability fix
ctruta Dec 5, 2025
2b3a667
Update the main AUTHORS file
ctruta Dec 5, 2025
b1e36ca
riscv: Fix the RVV build
asmorkalov Dec 5, 2025
57f0a71
Update the list of contributing authors
ctruta Dec 5, 2025
91bcccd
riscv: Delete unused helper functions and macros
ctruta Dec 5, 2025
c225b7d
oss-fuzz: Use the nalloc fuzz target
catenacyber Dec 3, 2025
ff615fd
build: Remove leftover ASM language from CMake `project`
jcar87 Dec 5, 2025
4e3f57d
Release libpng version 1.6.53
ctruta Dec 5, 2025
e8d40e1
Bump version to 1.6.54.git
ctruta Dec 8, 2025
0e89437
fix: Use `png_voidp` instead of `voidp` in pngread.c and pngwrite.c
ctruta Oct 13, 2025
54c1275
chore: Tidy up whitespace in declarations and definitions
ctruta Oct 24, 2025
9e4e247
Update the copyright year
ctruta Jan 7, 2026
e4f7ad4
Fix a heap buffer over-read in `png_image_read_direct_scaled`
ctruta Jan 9, 2026
ef14664
refactor: Improve naming clarity in the `png_image_read_*` functions
ctruta Jan 9, 2026
cf155de
fix: Remove incorrect truncation casts from `png_write_image_*`
ctruta Jan 10, 2026
e086e68
refactor: Improve naming clarity in `png_image_write*` and `png_write_*`
ctruta Jan 10, 2026
296965f
oss-fuzz: Disable nalloc with memory sanitizer
catenacyber Dec 7, 2025
7a77762
oss-fuzz: Replace unicode space with ascii space
catenacyber Dec 7, 2025
25ec74f
oss-fuzz: Add three targets
catenacyber Dec 7, 2025
f88784b
chore(oss-fuzz): Fix the lint errors
ctruta Jan 12, 2026
02f2b4f
Release libpng 1.6.54
ctruta Jan 12, 2026
b884e8c
Bump version to 1.6.55.git
ctruta Feb 6, 2026
01d03b8
Fix a heap buffer overflow in `png_set_quantize`
ctruta Feb 6, 2026
2f7991c
Add .markdownlint.yml, a configuration file for markdownlint
ctruta Feb 9, 2026
9404d8e
chore: Pacify markdownlint
ctruta Feb 9, 2026
b72e38c
oss-fuzz: Restrict the nalloc build to libfuzzer
catenacyber Jan 23, 2026
c3e3049
Release libpng version 1.6.55
ctruta Feb 9, 2026
61b3a6f
Bump version to 1.6.56.git
ctruta Feb 11, 2026
e0dbfd4
refactor: Clean up the redundant top-level const qualifiers
ctruta Nov 3, 2025
d54127e
refactor: Clean up pointer variable declarations
ctruta Nov 7, 2025
8d24508
Fix typographical errors
THE-Spellchecker Jan 11, 2026
62f9a90
oss-fuzz: Fix build.sh for/if
catenacyber Feb 11, 2026
646d55a
Fix wrong channel indices in `png_image_read_and_map` RGB_ALPHA path
ylwango613 Feb 24, 2026
0e731d1
Fix two copy-paste typos in colormap read and sPLT write
ylwango613 Feb 26, 2026
b137d21
Add missing NULL pointer checks in four public API functions
ylwango613 Feb 26, 2026
7d52a80
Validate shift bit depths in `png_set_shift` to prevent infinite loop
ylwango613 Feb 28, 2026
838b2e8
build: Deprecate the POINTER_INDEXING config option
ctruta Mar 6, 2026
2d89990
oss-fuzz: Fix memory leaks and API misuse in the transformations fuzzer
OwenSanzas Mar 5, 2026
905e1f8
oss-fuzz: Fix API misuse in the readapi fuzzer
OwenSanzas Mar 5, 2026
c082281
oss-fuzz: Use bash in the nalloc wrapper script
catenacyber Mar 8, 2026
e1fa87e
oss-fuzz: Rename `_nalloc` to `@nalloc` to match the fuzztests naming
catenacyber Mar 8, 2026
753fc99
oss-fuzz: Build the nalloc variants only for the fuzzers that use nalloc
catenacyber Mar 8, 2026
0c37b8f
oss-fuzz: Fix indentation and rephrase comments in the build script
ctruta Mar 9, 2026
2301926
fix: Resolve use-after-free on `png_ptr->trans_alpha`
Oblivionsage Mar 15, 2026
bf7fefe
Add Halil Oktay to AUTHORS
Oblivionsage Mar 17, 2026
a3a2144
fix: Initialize tail bytes in `trans_alpha` buffers
Oblivionsage Mar 17, 2026
7ea9eea
fix: Resolve use-after-free on `png_ptr->palette`
ctruta Mar 20, 2026
c1b0318
fix: Sync `info_ptr->palette` after in-place transforms
ctruta Mar 20, 2026
aba9f18
fix(arm): Resolve out-of-bounds read/write in NEON palette expansion
ctruta Mar 21, 2026
1632f04
refactor(arm): Replace bit shifts and sizeof with plain expressions
ctruta Mar 23, 2026
0000228
fix(test): Add missing test and tidy up the test list in Makefile.am
ctruta Mar 23, 2026
98019f6
test: Add negative-stride test coverage to pngstest
ctruta Mar 23, 2026
a625147
chore: Rerun `./autogen.sh --maintainer`
ctruta Mar 23, 2026
9929ba2
refactor: Avoid undefined behavior (signed int overflow) in negations
ctruta Mar 23, 2026
0126d42
refactor(test): Avoid undefined pointer arithmetic in pngstest.c
ctruta Mar 23, 2026
80c0485
chore(test): Add comments and tidy up test definitions
ctruta Mar 25, 2026
dc1732e
oss-fuzz: Restrict transformations_fuzzer to transformations
catenacyber Mar 9, 2026
2f79003
fix: Use the correct parameter name in `png_file_add_chunk`
Jeffin820 Mar 13, 2026
5f9a0b1
Update the main AUTHORS file
ctruta Mar 25, 2026
d5515b5
Release libpng version 1.6.56
ctruta Mar 25, 2026
2182a67
Bump version to 1.6.57.git
ctruta Mar 27, 2026
398cbe3
fix: Handle self-referencing pointers in getter-to-setter aliasing
ctruta Mar 30, 2026
930dfe0
chore: Rerun `./autogen.sh --maintainer`
ctruta Mar 30, 2026
55d20aa
fix: Handle getter-to-setter aliasing in append-style chunk setters
ctruta Mar 30, 2026
2c97486
fix: Prevent integer overflow in rowbytes computation
mohammadmseet-hue Apr 6, 2026
95ab3fd
Release libpng version 1.6.57
ctruta Apr 8, 2026
ac07fb0
Bump version to 1.6.58.git
ctruta Apr 15, 2026
d4c4e49
fix: Sync `info_ptr->palette` unconditionally after in-place transforms
ctruta Apr 15, 2026
571a895
test: Ensure the palette sync follows the gamma correction
ctruta Apr 15, 2026
6eb1ad8
chore: Update .gitignore to exclude the recently-added test program
ctruta Apr 15, 2026
3061454
Release libpng version 1.6.58
ctruta Apr 15, 2026
8c62c3b
Bump version to 1.6.59.git
ctruta Apr 22, 2026
d3f14cd
maint: Migrate the CI software licensing to the REUSE Specification
ctruta May 11, 2026
7b85a6f
maint: Apply the MIT-0 license to .github/workflows/
ctruta May 11, 2026
99652c9
ci: Add support for testing libpng on Windows ARM64
MugundanMCW Apr 19, 2026
145eced
ci: Migrate the Windows x64 job to Visual Studio 2026 on "windows-2025"
ctruta Jun 15, 2026
78ae423
build: Fix wrong symlink created for import library on MinGW and Cygwin
carlo-bramini May 10, 2026
fad0b25
fix(build): Use space-separated string for CMAKE_REQUIRED_FLAGS
yaito3014 Jun 12, 2026
7ed557b
build: Raise the CMake policy maximum version to 4.4
ctruta Jun 19, 2026
cae4745
fix: Prevent double-freeing `png_struct` members on allocation failure
jortles May 29, 2026
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
17 changes: 10 additions & 7 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ version: 1.6.x-{build}

branches:
except:
- /libpng[0-1][0-7]/
- /master/
- /v[0-9]+[.][0-9]+[.][0-9]+/

image:
- Visual Studio 2022
Expand Down Expand Up @@ -47,6 +48,7 @@ install:
- 'if "%TOOLCHAIN%"=="vstudio" C:\tools\vcpkg\vcpkg.exe integrate install'
- 'if "%TOOLCHAIN%"=="llvm" C:\tools\vcpkg\vcpkg.exe install zlib:%ARCH%-windows'
- 'if "%TOOLCHAIN%"=="llvm" C:\tools\vcpkg\vcpkg.exe integrate install'
- 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="cmake" C:\msys64\usr\bin\pacman.exe -S --noconfirm mingw-w64-%ARCH%-cmake mingw-w64-%ARCH%-ninja'

before_build:
- 'if "%TOOLCHAIN%"=="vstudio" set CI_CMAKE_GENERATOR=Visual Studio 17 2022'
Expand All @@ -57,11 +59,11 @@ before_build:
- 'if "%TOOLCHAIN%"=="vstudio" if "%ARCH%"=="arm64" set CI_CMAKE_VARS=-DPNG_TESTS=0'
- 'if "%TOOLCHAIN%"=="llvm" set CI_CMAKE_GENERATOR=Ninja'
- 'if "%TOOLCHAIN%"=="llvm" set CI_CMAKE_TOOLCHAIN_FILE=C:\tools\vcpkg\scripts\buildsystems\vcpkg.cmake'
- 'if "%TOOLCHAIN%"=="llvm" set CI_CC=clang.exe'
- 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="cmake" set CI_CMAKE_GENERATOR=Unix Makefiles'
- 'if "%TOOLCHAIN%"=="msys2" if "%ARCH%"=="i686" set PATH=C:\msys64\mingw32\bin;%PATH%'
- 'if "%TOOLCHAIN%"=="msys2" if "%ARCH%"=="x86_64" set PATH=C:\msys64\mingw64\bin;%PATH%'
- 'if "%TOOLCHAIN%"=="msys2" set CI_CC=%ARCH%-w64-mingw32-gcc.exe'
- 'if "%TOOLCHAIN%"=="llvm" set CI_CC=clang'
- 'if "%TOOLCHAIN%"=="msys2" set CI_CMAKE_GENERATOR=Ninja'
- 'if "%TOOLCHAIN%"=="msys2" set CI_CC=gcc'
- 'if "%TOOLCHAIN%"=="msys2" if "%ARCH%"=="i686" set MSYSTEM=MINGW32'
- 'if "%TOOLCHAIN%"=="msys2" if "%ARCH%"=="x86_64" set MSYSTEM=MINGW64'
- 'set CI_CMAKE_BUILD_FLAGS=-j2'
- 'set CI_CTEST_FLAGS=-j2'
- 'set CI_MAKE_FLAGS=-j2'
Expand All @@ -75,4 +77,5 @@ build_script:
- 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="makefiles" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_makefiles.sh"'

cache:
- C:\tools\vcpkg\installed
- 'C:\tools\vcpkg\installed'
- 'C:\msys64\var\cache\pacman'
94 changes: 94 additions & 0 deletions .cmake-format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# https://pypi.org/project/cmakelang
# https://github.com/cheshirekow/cmake_format

# ----------------------
# Options for formatting
# ----------------------

# How wide to allow formatted cmake files
# TODO: Reflow the CMake files to allow setting the maximum line width to 100.
line_width: 255

# How many spaces to tab for indent
tab_size: 2

# If true, lines are indented using tab characters (utf-8 0x09) instead of
# <tab_size> space characters (utf-8 0x20). In cases where the layout would
# require a fractional tab character, the behavior of the fractional
# indentation is governed by <fractional_tab_policy>
use_tabchars: false

# If <use_tabchars> is True, then the value of this variable indicates how
# fractional indentions are handled during whitespace replacement. If set to
# 'use-space', fractional indentation is left as spaces (utf-8 0x20). If set
# to `round-up` fractional indentation is replaced with a single tab character
# (utf-8 0x09) effectively shifting the column to the next tabstop
fractional_tab_policy: "use-space"

# Enable comment markup parsing and reflow
enable_markup: false

# -------------------
# Options for linting
# -------------------

# Lint codes to disable
disabled_codes: [
# TODO:
# Reconcile the CMake variable names with the patterns below, then
# re-enable the "invalid variable name XXX" messages.
"C0103",

# TODO:
# Add brief COMMENT arguments to the `add_custom_target` commands.
"C0113",
]

# Regular expression pattern describing valid function names
function_pattern: "[0-9a-z_]+"

# Regular expression pattern describing valid macro names
macro_pattern: "[0-9A-Z_]+"

# Regular expression pattern describing valid names for variables with global
# (cache) scope
global_var_pattern: "[A-Z][0-9A-Z_]+"

# Regular expression pattern describing valid names for variables with global
# scope (but internal semantic)
internal_var_pattern: "_[A-Z][0-9A-Z_]+"

# Regular expression pattern describing valid names for variables with local
# scope
local_var_pattern: "[a-z][a-z0-9_]+"

# Regular expression pattern describing valid names for privatedirectory
# variables
private_var_pattern: "_[0-9a-z_]+"

# Regular expression pattern describing valid names for public directory
# variables
public_var_pattern: "[A-Z][0-9A-Z_]+"

# Regular expression pattern describing valid names for function/macro
# arguments and loop variables.
argument_var_pattern: "[a-z][a-z0-9_]+"

# Regular expression pattern describing valid names for keywords used in
# functions or macros
keyword_pattern: "[A-Z][0-9A-Z_]+"

# In the heuristic for C0201, how many conditionals to match within a loop in
# before considering the loop a parser
max_conditionals_custom_parser: 2

# Require at least this many newlines between statements;
# require no more than this many newlines between statements;
# etc.
min_statement_spacing: 1
max_statement_spacing: 2
max_returns: 6
max_branches: 12
max_arguments: 5
max_localvars: 15
max_statements: 50
41 changes: 29 additions & 12 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,49 @@ charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true

# Traditionally, the end-of-line character has been platform-specific.
end_of_line = unset
[*.txt]
indent_size = unset
indent_style = space

[*.[chS]]
indent_size = 3
indent_style = space
max_doc_length = 80
max_line_length = 80

[*.dfa]
indent_size = 3
indent_style = space
max_line_length = 81
max_doc_length = 80
max_line_length = 80

[*.{awk,cmake,dfa,in,sh}]
[*.awk]
indent_size = 3
indent_style = space
max_doc_length = 80
max_line_length = 100

[*.txt]
[*.cmake]
indent_size = 2
indent_style = space
max_line_length = unset
max_doc_length = 80
max_line_length = 100

[{Makefile.in,ltmain.sh}]
indent_style = unset
insert_final_newline = unset
max_line_length = unset
trim_trailing_whitespace = unset
[*.sh]
indent_size = 4
indent_style = space
max_doc_length = 100
max_line_length = 100

[*~]
[{Makefile.in,aclocal.m4,ltmain.sh}]
indent_size = unset
indent_style = unset
insert_final_newline = unset
max_doc_length = unset
max_line_length = unset
trim_trailing_whitespace = unset

[COMMIT_EDITMSG]
indent_style = space
max_doc_length = unset
max_line_length = 72
10 changes: 10 additions & 0 deletions .editorconfig-checker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Disable": {
"Charset": true,
"IndentSize": true
},
"Exclude": [
".git/",
"out/"
]
}
34 changes: 34 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright (C) 2024 Cosmin Truta
# SPDX-License-Identifier: MIT-0

name: Linting libpng

on:
push:
branches:
- libpng16
- libpng18
pull_request:
branches:
- libpng16
- libpng18

jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Set up the cache
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/pip.txt') }}
restore-keys: ${{ runner.os }}-pip-
- name: Install yamllint
run: pip install yamllint
- name: Install editorconfig-checker
uses: editorconfig-checker/action-editorconfig-checker@main
- name: Check out the code
uses: actions/checkout@v4
- name: Run the linting script
run: bash ./ci/ci_lint.sh
35 changes: 35 additions & 0 deletions .github/workflows/verify-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright (C) 2025 Cosmin Truta
# SPDX-License-Identifier: MIT-0

name: Verifying libpng on Linux

on:
push:
branches:
- libpng16
- libpng18
pull_request:
branches:
- libpng16
- libpng18

jobs:
verify-linux:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends build-essential zlib1g-dev
if [[ "${{ github.ref }}" != refs/*/libpng16 && "${{ github.base_ref }}" != libpng16 ]]
then
sudo apt-get install -y --no-install-recommends autoconf automake libtool m4
fi
- name: Check out the code
uses: actions/checkout@v4
- name: Run the configure verification script
run: bash ./ci/ci_verify_configure.sh
env:
CI_MAKE_FLAGS: -j2
CI_SANITIZERS: address,undefined
28 changes: 28 additions & 0 deletions .github/workflows/verify-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright (C) 2025 Cosmin Truta
# SPDX-License-Identifier: MIT-0

name: Verifying libpng on macOS

on:
push:
branches:
- libpng16
- libpng18
pull_request:
branches:
- libpng16
- libpng18

jobs:
verify-macos:
runs-on: macos-latest
timeout-minutes: 10
steps:
- name: Check out the code
uses: actions/checkout@v4
- name: Run the CMake verification script
run: bash ./ci/ci_verify_cmake.sh
env:
CI_CMAKE_GENERATOR: Xcode
CI_CMAKE_BUILD_FLAGS: -j2
CI_CTEST_FLAGS: -j2
51 changes: 51 additions & 0 deletions .github/workflows/verify-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Copyright (C) 2025 Cosmin Truta
# SPDX-License-Identifier: MIT-0

name: Verifying libpng on Windows

on:
push:
branches:
- libpng16
- libpng18
pull_request:
branches:
- libpng16
- libpng18

jobs:
verify-windows:
strategy:
matrix:
include:
- os: windows-2025
vcpkg_triplet: x64-windows
cmake_generator: Visual Studio 18 2026
cmake_generator_platform: x64
- os: windows-11-arm
vcpkg_triplet: arm64-windows
cmake_generator: Visual Studio 17 2022
cmake_generator_platform: ARM64
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
- name: Set up vcpkg cache
uses: actions/cache@v4
with:
path: C:/vcpkg/installed
key: ${{ runner.os }}-vcpkg-${{ matrix.vcpkg_triplet }}-${{ hashFiles('vcpkg.json', '**/vcpkg.json') }}
restore-keys: ${{ runner.os }}-vcpkg-${{ matrix.vcpkg_triplet }}-
- name: Install dependencies
run: |
vcpkg install zlib:${{ matrix.vcpkg_triplet }}
vcpkg integrate install
- name: Check out the code
uses: actions/checkout@v4
- name: Run the CMake verification script
run: bash ./ci/ci_verify_cmake.sh
env:
CI_CMAKE_GENERATOR: ${{ matrix.cmake_generator }}
CI_CMAKE_GENERATOR_PLATFORM: ${{ matrix.cmake_generator_platform }}
CI_CMAKE_TOOLCHAIN_FILE: C:/vcpkg/scripts/buildsystems/vcpkg.cmake
CI_CMAKE_BUILD_FLAGS: -j2
CI_CTEST_FLAGS: -j2
Loading