summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* ci: Add a new top-level directory, dedicated for CI verificationCosmin Truta2020-05-186-61/+60
| | | | | | | | | | | | | Update the ci_*.sh scripts and move them to the more conventional ci/ directory. Update .appveyor.yml and .travis.yml, as well as the AUTHORS file, accordingly. Speed up ci_cmake.sh: add "-DPNG_TESTS=OFF" to the list of CMake variables if CI_NO_TEST is true. Remove "sudo: false" from .travis.yml. Refactor .appveyor.yml.
* cmake: Add an option to enable/disable building of executablesAlex Gaynor2020-05-181-2/+4
| | | | | | | | | | Add the CMake option PNG_EXECUTABLES (on by default) in order to allow or disallow the building of non-essential executable programs associated with libpng. Contributed-by: Alex Gaynor <alex.gaynor@gmail.com> Contributed-by: Cosmin Truta <ctruta@gmail.com> Signed-off-by: Cosmin Truta <ctruta@gmail.com>
* mips: Remove "last changed" version information from source commentCosmin Truta2020-05-171-1/+2
| | | | This information is maintained by the version control system.
* mips: Fix initialization: always close "/proc/cpuinfo"gxw2020-05-171-1/+3
|
* Fix CMake build with EmscriptenSimon Hausmann2020-05-171-1/+2
| | | | | | | When building with Emscripten, linkage to libm is neither required nor working. As find_library will fail, M_LIBRARY will be set to NOTFOUND and the build would fail later. The build works just fine without libm linkage.
* Add an __LLVM,__asm section for clang builds on ARMDan Field2020-05-172-0/+5
|
* cmake: Fix a build error on iOSSteve Robinson2020-05-171-3/+4
| | | | | Avoid the awk-based configuration when cross-compiling from macOS to iOS.
* Fix example.cZack Middleton2020-04-271-0/+1
|
* Fix a warning on Linux caused by _BSD_SOURCEwillson-chen2020-04-271-0/+1
| | | | | | | | | | I got a warning while compiling under Ubuntu 18.04 and gcc 7.4: "__BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" Quote from the Linux Programmer's Manual: "To allow code that requires _BSD_SOURCE in glibc 2.19 and earlier and _DEFAULT_SOURCE in glibc 2.20 and later to compile without warnings, define both _BSD_SOURCE and _DEFAULT_SOURCE."
* Fix memory leak if eXIf has incorrect crcskal2020-04-271-4/+2
| | | | | | | | | | | | | Problem description: Imagine a bitstream with an eXIf data segment that has invalid CRC. If png_crc_finish() fails at line 2090, info_ptr->eXIf_buf is not freed (despite the free_me setting at line 2062) because png_free_data() is not called. png_read_info() is actually looping several time over the png_eXIf chunk, calling png_handle_eXIf() several time in a row without freeing the buffer. This patch fixes the problem by leaving info_ptr's content in a clean state in case of failure, as it is done at line 2084.
* cmake: Use the correct ZLIB_* variable namesDavid Callu2020-04-261-7/+8
| | | | | ZLIB_LIBRARIES and ZLIB_INCLUDE_DIRS are the official cmake variable names.
* scripts: Clean up the makefilesCosmin Truta2020-03-2934-452/+381
| | | | | | | | | | Delete variables (ALIGN, ARCH, DOCS) and targets (writelock) that are no longer necessary. Reorder the object file lists alphabetically, consistently across all makefiles and build scripts. Apply other minor fixes.
* scripts: Fix makefile.std and include it in the CI verificationCosmin Truta2020-03-293-20/+22
|
* Update configuration for Travis CI; add configuration for AppVeyor CICosmin Truta2020-03-293-49/+103
| | | | | | | | | | | | | | | | | Exclude the branch "libpng16" from testing. It's identical to "master". Also exclude the other (non-current) "libpng[0-1][0-7]" branches. Parallelize the builds and the unit tests. For Travis CI, update the build matrix as follows: * On Linux, use both clang and gcc. * On macOS, use clang only, with and without Xcode. For AppVeyor CI, add a build matrix as follows: * On Windows, use Microsoft Visual Studio 2019 on x86, x64 and arm64. * Also on Windows, use MSYS2 on x86 and x64. Use the new scripts/ci_*.sh; remove the old scripts/travis.sh.
* scripts: Add general-purpose utilities for continuous integrationCosmin Truta2020-03-294-1/+276
| | | | | | | | | | | Currently, libpng supports three different types of build automation: the GNU autotools, CMake, and a legacy of hand-made makefiles. In order to simplify the continous integration of all of the above build options, we introduce the following scripts: * ci_autotools.sh: CI utility for the Autotools build * ci_cmake.sh: CI utility for the CMake build * ci_legacy.sh: CI utility for the legacy makefiles
* Update the copyright yearCosmin Truta2020-02-025-9/+9
|
* oss-fuzz: Add custom malloc with max limit to prevent OOMChristopher Thompson2019-04-251-0/+19
| | | | | | | | | | This adds the custom malloc/free functions from the old libpng_read_fuzzer to the upstream fuzzer to prevent clusterfuzz running into OOM. Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=904054 Contributed-by: Christopher Thompson <cthomp@chromium.org> Signed-off-by: Cosmin Truta <ctruta@gmail.com>
* arm: Use <arm_neon.h> when compiling aarch64 intrinsics with clang-clRyan VanderMeulen2019-04-243-3/+3
| | | | | | | | | MSVC's <arm64_neon.h> header contains cl.exe intrinsics that are not recognized by clang-cl. Contributed-by: Ryan VanderMeulen <rvandermeulen@mozilla.com> Contributed-by: Mike Klein <mtklein@google.com> Signed-off-by: Cosmin Truta <ctruta@gmail.com>
* arm: Move a png_debug statement to its correct placeCosmin Truta2019-04-221-2/+2
| | | | It should be placed immediately after all variable declarations.
* scripts: Delete makefile.clang-asan and makefile.gcc-asanCosmin Truta2019-04-222-174/+0
| | | | Travis CI is now running sanitizer-enabled test jobs.
* Add support for Travis CICosmin Truta2019-04-222-0/+60
|
* Avoid random test failures by running pngtest sequentially onlyCosmin Truta2019-04-214-18/+10
| | | | | | | | It is unreliable to run pngtest in parallel, due to competing writes to the same intermediate/output file ("pngout.png"). Customization of this output file name should be possible, but it is currently broken.
* Bump version to 1.6.38.gitCosmin Truta2019-04-1415-40/+50
|
* Release libpng version 1.6.37v1.6.37Cosmin Truta2019-04-1419-123/+95
|
* Fix typo in the new v2 licenseMiguel Ojeda2019-04-142-2/+2
| | | | | Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> Signed-off-by: Cosmin Truta <ctruta@gmail.com>
* pngminus: Use the system zlib by defaultCosmin Truta2019-04-101-3/+8
| | | | | | | | | | If a zlib source tree exists besides the libpng source tree in the same parent directory, the pngminus build may fail, unless the zlib tree is built fully. In order to avoid this failing scenario, do not use the custom-built zlib by default. (The custom-built zlib is still necessary on platforms that lack a system-built zlib.)
* pngminus: Change license to MIT, etc.Willem van Schaik2019-04-1010-194/+125
| | | | | | | | | | | | Change the license to MIT. Move the license text from the source files to a LICENSE file. Move the change log from the source files to a CHANGES file. Delete the Turbo C makefile and simplify the Linux makefile heavily. Create explicitly named static and shared executables in the makefile. Refresh the README file a bit from the twenty year old one. Signed-off-by: Willem van Schaik <willem@schaik.com> Signed-off-by: Cosmin Truta <ctruta@gmail.com>
* pngminus: Add a CMakeLists fileCosmin Truta2019-04-101-0/+24
|
* pngminus: Improve portability and fix style (cont'd)Cosmin Truta2019-04-101-117/+111
|
* pngminus: Improve portability and fix styleCosmin Truta2019-04-101-87/+65
|
* pngminus: Fix a buffer overflow in tokenizerCosmin Truta2019-04-101-25/+26
|
* arm: Partially revert "Fix a memory leak in the riffled palette [...]"Cosmin Truta2019-04-071-16/+14
| | | | | | | | | | | | The memory leak remains fixed, but the associated refactoring is being reverted. Moving the initialization of the riffled palette from png_do_read_transformations to png_init_palette_transformations has caused a regression in some of the test programs. Although png_init_palette_transformations is the proper place to perform this initialization, and the test programs are technically incorrect to fail, we are still undoing that refactoring for the time being.
* arm: Rename all functions to the pattern png_*_neon; add debug tracesCosmin Truta2019-03-313-9/+15
|
* Call png_image_free_function without guarding it with png_safe_executeCosmin Truta2019-02-031-2/+1
| | | | | | | png_image_free_function (or any other destructor) should never fail. Destructors need not and must not be executed under png_safe_execute. Reference: CVE-2019-7317, use-after-free in png_image_free
* Fix a memory leak in pngtest.cCosmin Truta2019-02-031-3/+5
| | | | | | | | Ensure that row_buf is deallocated not only after a read error, but also after a write error. Use the format "%p" instead of "0x%08lx" for printf-ing row_buf in a portable manner.
* Fix a memory leak in the riffled palette optimization on ARM; refactorCosmin Truta2019-02-036-66/+68
| | | | | | | | | | | | | | | | | | | | Move deallocation of riffled_palette from png_write_destroy to png_read_destroy. The reader (not the writer) is the owner of riffled_palette. Move allocation and initialization of riffled_palette from png_do_read_transformations to png_init_palette_transformations. Allow riffled_palette inside png_struct only if the ARM Neon optimizations are enabled. Rename png_riffle_palette_rgba to png_riffle_palette_rgba8, etc., to better indicate the strict applicability of these routines. Fix an unused parameter warning in the build configurations where riffled palette optimization is not enabled. Fix indentation.
* scripts: Add makefile.clang, makefile.clang-asan and makefile.gcc-asanCosmin Truta2019-01-205-6/+268
| | | | Also apply minor updates to makefile.gcc and makefile.msys
* Update the copyright yearCosmin Truta2019-01-195-11/+11
|
* scripts: Delete makefile.ne12bsd; clean up makefile.*bsdCosmin Truta2018-12-303-75/+16
|
* Bump version to 1.6.37.gitCosmin Truta2018-12-3020-44/+53
|
* Join the branches 'libpng16' and 'master'Cosmin Truta2018-12-010-0/+0
|\ | | | | | | | | | | | | The branch 'libpng16' is for tracking libpng version 1.6.x. The branch 'master' is for tracking the latest stable libpng version. These branches will diverge again at the next major libpng upgrade.
| * [master] Imported from libpng-1.6.36.tarCosmin Truta2018-12-01100-2473/+1660
| |
| * [master] Imported from libpng-1.6.35.tarCosmin Truta2018-07-15131-1592/+46845
| |
| * [master] Imported from libpng-1.6.34.tarGlenn Randers-Pehrson2017-11-0659-104/+77
| |
| * [master] Imported from libpng-1.6.33.tarGlenn Randers-Pehrson2017-09-2871-218/+530
| |
| * [master] Imported from libpng-1.6.32.tarGlenn Randers-Pehrson2017-08-2475-249/+895
| |
| * [master] Imported from libpng-1.6.31.tarGlenn Randers-Pehrson2017-07-2753-235/+1016
| |
| * [master] Imported from libpng-1.6.30.tarGlenn Randers-Pehrson2017-06-2857-249/+491
| |
| * [master] Imported from libpng-1.6.29.tarlibpng-1.6.29-master-signedGlenn Randers-Pehrson2017-03-1646-478/+1488
| |
| * [master] Imported from libpng-1.6.28.tarlibpng-1.6.28-signedGlenn Randers-Pehrson2017-01-0530-111/+130
| |