Skip to content
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.

Commit

Permalink
Update libpng to v1.6.25
Browse files Browse the repository at this point in the history
  • Loading branch information
rmtheis committed Feb 2, 2017
1 parent d6cc1fb commit 301470e
Show file tree
Hide file tree
Showing 93 changed files with 9,436 additions and 2,446 deletions.
49 changes: 18 additions & 31 deletions tess-two/jni/libpng/ANNOUNCE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Libpng 1.6.20 - December 3, 2015
Libpng 1.6.25 - September 1, 2016

This is a public release of libpng, intended for use in production codes.

Expand All @@ -7,43 +7,30 @@ Files available for download:
Source files with LF line endings (for Unix/Linux) and with a
"configure" script

libpng-1.6.20.tar.xz (LZMA-compressed, recommended)
libpng-1.6.20.tar.gz
libpng-1.6.25.tar.xz (LZMA-compressed, recommended)
libpng-1.6.25.tar.gz

Source files with CRLF line endings (for Windows), without the
"configure" script

/scratch/glennrp/Libpng16/lpng1620.7z (LZMA-compressed, recommended)
/scratch/glennrp/Libpng16/lpng1620.zip
lpng1625.7z (LZMA-compressed, recommended)
lpng1625.zip

Other information:

libpng-1.6.20-README.txt
libpng-1.6.20-LICENSE.txt
libpng-1.6.20-*.asc (armored detached GPG signatures)

Changes since the last public release (1.6.19):
Avoid potential pointer overflow/underflow in png_handle_sPLT() and
png_handle_pCAL() (Bug report by John Regehr).
Fixed incorrect implementation of png_set_PLTE() that uses png_ptr
not info_ptr, that left png_set_PLTE() open to the CVE-2015-8126
vulnerability.
Backported tests from libpng-1.7.0beta69.
Fixed an error in handling of bad zlib CMINFO field in pngfix, found by
American Fuzzy Lop, reported by Brian Carpenter. inflate() doesn't
immediately fault a bad CMINFO field; instead a 'too far back' error
happens later (at least some times). pngfix failed to limit CMINFO to
the allowed values but then assumed that window_bits was in range,
triggering an assert. The bug is mostly harmless; the PNG file cannot
be fixed.
In libpng 1.6 zlib initialization was changed to use the window size
in the zlib stream, not a fixed value. This causes some invalid images,
where CINFO is too large, to display 'correctly' if the rest of the
data is valid. This provides a workaround for zlib versions where the
error arises (ones that support the API change to use the window size
in the stream).

Send comments/corrections/commendations to png-mng-implement at lists.sf.net
libpng-1.6.25-README.txt
libpng-1.6.25-LICENSE.txt
libpng-1.6.25-*.asc (armored detached GPG signatures)

Changes since the last public release (1.6.24):
Reject oversized iCCP profile immediately.
Cleaned up PNG_DEBUG compile of pngtest.c.
Conditionally compile png_inflate().
Don't install pngcp; it conflicts with pngcp in the pngtools package.
Minor editing of INSTALL, (whitespace, added copyright line)
Added MIPS support (Mandar Sahastrabuddhe <[email protected]>).
Rebased contrib/intel/intel_sse.patch after the MIPS implementation.

(subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
to subscribe)
Expand Down
123 changes: 123 additions & 0 deletions tess-two/jni/libpng/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
// We need to build this for both the device (as a shared library)
// and the host (as a static library for tools to use).

cc_defaults {
name: "libpng-defaults",
srcs: [
"png.c",
"pngerror.c",
"pngget.c",
"pngmem.c",
"pngpread.c",
"pngread.c",
"pngrio.c",
"pngrtran.c",
"pngrutil.c",
"pngset.c",
"pngtrans.c",
"pngwio.c",
"pngwrite.c",
"pngwtran.c",
"pngwutil.c",
],
cflags: [
"-std=gnu89",
"-Wno-unused-parameter",
],
arch: {
arm: {
srcs: [
"arm/arm_init.c",
"arm/filter_neon.S",
"arm/filter_neon_intrinsics.c",
],
},
arm64: {
srcs: [
"arm/arm_init.c",
"arm/filter_neon.S",
"arm/filter_neon_intrinsics.c",
],
},
x86: {
srcs: [
"contrib/intel/intel_init.c",
"contrib/intel/filter_sse2_intrinsics.c",
],
// Disable optimizations because they crash on windows
// cflags: ["-DPNG_INTEL_SSE_OPT=1"],
},
x86_64: {
srcs: [
"contrib/intel/intel_init.c",
"contrib/intel/filter_sse2_intrinsics.c",
],
// Disable optimizations because they crash on windows
// cflags: ["-DPNG_INTEL_SSE_OPT=1"],
},
},
target: {
android: {
shared_libs: ["libz"],
},
android_x86: {
cflags: ["-DPNG_INTEL_SSE_OPT=1"],
},
android_x86_64: {
cflags: ["-DPNG_INTEL_SSE_OPT=1"],
},
host: {
shared_libs: ["libz-host"],
},
},
export_include_dirs: ["."],
clang: true,
}

// For the host and device platform
// =====================================================

cc_library {
name: "libpng",
host_supported: true,
defaults: ["libpng-defaults"],
target: {
windows: {
enabled: true,
},
},
}

// For the device (static) for NDK
// =====================================================

cc_library_static {
name: "libpng_ndk",
defaults: ["libpng-defaults"],
cflags: ["-ftrapv"],

shared_libs: ["libz"],
sdk_version: "14",
}

// For testing
// =====================================================

cc_test {
clang: true,
host_supported: true,
gtest: false,
srcs: ["pngtest.c"],
name: "pngtest",
shared_libs: [
"libpng",
],
target: {
android: {
shared_libs: ["libz"],
},
host: {
shared_libs: ["libz-host"],
},
},
}
Loading

0 comments on commit 301470e

Please sign in to comment.