Compare commits

..

6 Commits

Author SHA1 Message Date
Glenn Randers-Pehrson
3cd4a410a5 [libpng15] Imported from libpng-1.5.22beta01.tar 2015-01-28 19:34:32 -06:00
Glenn Randers-Pehrson
747cea57e3 [libpng15] Made the check for out-of-range values in png_set_tRNS() detect
values that are exactly 2^bit_depth, and work on 16-bit platforms.
2015-01-13 09:39:15 -06:00
Glenn Randers-Pehrson
ee48ecd71e [libpng15] Update ltmain.sh to libtool-2.4.4 2015-01-11 17:29:04 -06:00
Glenn Randers-Pehrson
e621f04541 [libpng15] Regenerated configure scripts with libtool-2.4.4 2014-12-28 19:18:57 -06:00
Glenn Randers-Pehrson
beddd7ed53 [libpng15] Bump version to 1.5.22beta01 2014-12-21 22:56:23 -06:00
Glenn Randers-Pehrson
67faef917b [libpng15] Imported from libpng-1.5.21.tar 2014-12-21 21:52:46 -06:00
38 changed files with 6222 additions and 4098 deletions

View File

@@ -1,5 +1,5 @@
Libpng 1.5.21rc03 - December 21, 2014
Libpng 1.5.22beta01 - January 28, 2015
This is not intended to be a public release. It will be replaced
within a few weeks by a public version or by another test version.
@@ -9,37 +9,29 @@ Files available for download:
Source files with LF line endings (for Unix/Linux) and with a
"configure" script
1.5.21rc03.tar.xz (LZMA-compressed, recommended)
1.5.21rc03.tar.gz
1.5.21rc03.tar.bz2
1.5.22beta01.tar.xz (LZMA-compressed, recommended)
1.5.22beta01.tar.gz
1.5.22beta01.tar.bz2
Source files with CRLF line endings (for Windows), without the
"configure" script
lp1521r03.7z (LZMA-compressed, recommended)
lp1521r03.zip
lp1522b01.7z (LZMA-compressed, recommended)
lp1522b01.zip
Other information:
1.5.21rc03-README.txt
1.5.21rc03-LICENSE.txt
libpng-1.5.21rc03-*.asc (armored detached GPG signatures)
1.5.22beta01-README.txt
1.5.22beta01-LICENSE.txt
libpng-1.5.22beta01-*.asc (armored detached GPG signatures)
Changes since the last public release (1.5.20):
Changes since the last public release (1.5.21):
Version 1.5.21beta01 [December 14, 2014]
Revised Makefile.am and scripts/*.dfn to work with MinGW/MSYS;
renamed scripts/*.dfn to scripts/*.c (Bob Friesenhahn and John Bowler).
Version 1.5.21rc01 [December 21, 2014]
Restored a test on width that was removed from png.c at libpng-1.6.9
(Bug report by Alex Eubanks).
Version 1.5.21rc02 [December 21, 2014]
Undid the update to pngrutil.c in 1.5.21rc01.
Version 1.5.21rc03 [December 21, 2014]
Fixed an overflow in png_combine_row with very wide interlaced images.
Version 1.5.22beta01 [January 28, 2015]
Regenerated configure scripts with libtool-2.4.4
Made the check for out-of-range values in png_set_tRNS() detect
values that are exactly 2^bit_depth, and work on 16-bit platforms.
Quieted some warnings from Coverity-scan.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

14
CHANGES
View File

@@ -4279,13 +4279,23 @@ Version 1.5.21beta01 [December 14, 2014]
Version 1.5.21rc01 [December 21, 2014]
Restored a test on width that was removed from png.c at libpng-1.6.9
(Bug report by Alex Eubanks).
(Bug report by Alex Eubanks, CVE-2015-0973).
Version 1.5.21rc02 [December 21, 2014]
Undid the update to pngrutil.c in 1.6.16rc01.
Version 1.5.21rc03 [December 21, 2014]
Fixed an overflow in png_combine_row with very wide interlaced images.
Fixed an overflow in png_combine_row with very wide interlaced images
(Bug report and fix by John Bowler, CVE-2014-9495).
Version 1.5.21 [December 22, 2014]
No changes.
Version 1.5.22beta01 [January 28, 2015]
Regenerated configure scripts with libtool-2.4.4
Made the check for out-of-range values in png_set_tRNS() detect
values that are exactly 2^bit_depth, and work on 16-bit platforms.
Quieted some warnings from Coverity-scan.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@@ -16,7 +16,7 @@ enable_testing()
set(PNGLIB_MAJOR 1)
set(PNGLIB_MINOR 5)
set(PNGLIB_RELEASE 21)
set(PNGLIB_RELEASE 22)
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
@@ -219,7 +219,7 @@ endif(NOT WIN32 OR CYGWIN OR MINGW)
# SET UP LINKS
if(PNG_SHARED)
set_target_properties(${PNG_LIB_NAME} PROPERTIES
# VERSION 15.${PNGLIB_RELEASE}.1.5.21rc03
# VERSION 15.${PNGLIB_RELEASE}.1.5.22beta01
VERSION 15.${PNGLIB_RELEASE}.0
SOVERSION 15
CLEAN_DIRECT_OUTPUT 1)

View File

@@ -10,7 +10,7 @@ this sentence.
This code is released under the libpng license.
libpng versions 1.2.6, August 15, 2004, through 1.5.21rc03, December 21, 2014, are
libpng versions 1.2.6, August 15, 2004, through 1.5.22beta01, January 28, 2015, are
Copyright (c) 2004, 2006-2014 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors
@@ -108,4 +108,4 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
December 21, 2014
January 28, 2015

2
README
View File

@@ -1,4 +1,4 @@
README for libpng version 1.5.21rc03 - December 21, 2014 (shared library 15.0)
README for libpng version 1.5.22beta01 - January 28, 2015 (shared library 15.0)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.

2549
aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

View File

@@ -48,8 +48,7 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#undef LT_OBJDIR
/* Name of package */

1942
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -18,15 +18,15 @@ AC_PREREQ(2.59)
dnl Version number stuff here:
AC_INIT([libpng], [1.5.21rc03], [png-mng-implement@lists.sourceforge.net])
AC_INIT([libpng], [1.5.22beta01], [png-mng-implement@lists.sourceforge.net])
AM_INIT_AUTOMAKE([1.13 serial-tests subdir-objects])
dnl stop configure from automagically running automake
AM_MAINTAINER_MODE
PNGLIB_VERSION=1.5.21rc03
PNGLIB_VERSION=1.5.22beta01
PNGLIB_MAJOR=1
PNGLIB_MINOR=5
PNGLIB_RELEASE=21
PNGLIB_RELEASE=22
dnl End of version number stuff

View File

@@ -1,6 +1,6 @@
Libpng-manual.txt - A description on how to use and modify libpng
libpng version 1.5.21rc03 - December 21, 2014
libpng version 1.5.22beta01 - January 28, 2015
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2014 Glenn Randers-Pehrson
@@ -11,7 +11,7 @@ Libpng-manual.txt - A description on how to use and modify libpng
Based on:
libpng versions 0.97, January 1998, through 1.5.21rc03 - December 21, 2014
libpng versions 0.97, January 1998, through 1.5.22beta01 - January 28, 2015
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2014 Glenn Randers-Pehrson
@@ -4531,13 +4531,13 @@ Other rules can be inferred by inspecting the libpng source.
XIV. Y2K Compliance in libpng
December 21, 2014
January 28, 2015
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
upward through 1.5.21rc03 are Y2K compliant. It is my belief that earlier
upward through 1.5.22beta01 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has two year fields. One is a 2-byte unsigned integer that

View File

@@ -1,6 +1,6 @@
.TH LIBPNG 3 "December 21, 2014"
.TH LIBPNG 3 "January 28, 2015"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.21rc03
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.22beta01
.SH SYNOPSIS
\fB
#include <png.h>\fP
@@ -492,7 +492,7 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng.
.SH LIBPNG.TXT
Libpng-manual.txt - A description on how to use and modify libpng
libpng version 1.5.21rc03 - December 21, 2014
libpng version 1.5.22beta01 - January 28, 2015
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2014 Glenn Randers-Pehrson
@@ -503,7 +503,7 @@ Libpng-manual.txt - A description on how to use and modify libpng
Based on:
libpng versions 0.97, January 1998, through 1.5.21rc03 - December 21, 2014
libpng versions 0.97, January 1998, through 1.5.22beta01 - January 28, 2015
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2014 Glenn Randers-Pehrson
@@ -5023,13 +5023,13 @@ Other rules can be inferred by inspecting the libpng source.
.SH XIV. Y2K Compliance in libpng
December 21, 2014
January 28, 2015
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
upward through 1.5.21rc03 are Y2K compliant. It is my belief that earlier
upward through 1.5.22beta01 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has two year fields. One is a 2-byte unsigned integer that
@@ -5272,6 +5272,8 @@ the first widely used release:
1.5.20 15 10520 15.so.15.20[.0]
1.5.21beta01-02 15 10521 15.so.15.21[.0]
1.5.21rc01-03 15 10521 15.so.15.21[.0]
1.5.21 15 10521 15.so.15.21[.0]
1.5.21beta01 15 10522 15.so.15.22[.0]
Henceforth the source version will match the shared-library minor
and patch numbers; the shared-library major version number will be
@@ -5328,7 +5330,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
Libpng version 1.5.21rc03 - December 21, 2014:
Libpng version 1.5.22beta01 - January 28, 2015:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
@@ -5351,7 +5353,7 @@ this sentence.
This code is released under the libpng license.
libpng versions 1.2.6, August 15, 2004, through 1.5.21rc03, December 21, 2014, are
libpng versions 1.2.6, August 15, 2004, through 1.5.22beta01, January 28, 2015, are
Copyright (c) 2004,2006-20014 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors
@@ -5450,7 +5452,7 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
December 21, 2014
January 28, 2015
.\" end of man page

View File

@@ -1,6 +1,6 @@
.TH LIBPNGPF 3 "December 21, 2014"
.TH LIBPNGPF 3 "January 28, 2015"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.21rc03
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.22beta01
(private functions)
.SH SYNOPSIS
\fB#include \fI"pngpriv.h"

5523
ltmain.sh

File diff suppressed because it is too large Load Diff

2
png.5
View File

@@ -1,4 +1,4 @@
.TH PNG 5 "December 21, 2014"
.TH PNG 5 "January 28, 2015"
.SH NAME
png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION

57
png.c
View File

@@ -1,8 +1,8 @@
/* png.c - location for general purpose libpng functions
*
* Last changed in libpng 1.5.21 [(PENDING RELEASE)]
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
* Last changed in libpng 1.5.22 [(PENDING RELEASE)]
* Copyright (c) 1998-2015 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -14,7 +14,7 @@
#include "pngpriv.h"
/* Generate a compiler error if there is an old png.h in the search path. */
typedef png_libpng_version_1_5_21rc03 Your_png_h_is_not_version_1_5_21rc03;
typedef png_libpng_version_1_5_22beta01 Your_png_h_is_not_version_1_5_22beta01;
/* Tells libpng that we have already handled the first "num_bytes" bytes
* of the PNG file signature. If the PNG data is embedded into another
@@ -149,9 +149,10 @@ png_calculate_crc(png_structp png_ptr, png_const_bytep ptr, png_size_t length)
do
{
uInt safeLength = (uInt)length;
#ifndef __COVERITY__
if (safeLength == 0)
safeLength = (uInt)-1; /* evil, but safe */
#endif
crc = crc32(crc, ptr, safeLength);
/* The following should never issue compiler warnings, if they do the
@@ -660,13 +661,13 @@ png_get_copyright(png_const_structp png_ptr)
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
"libpng version 1.5.21rc03 - December 21, 2014" PNG_STRING_NEWLINE \
"libpng version 1.5.22beta01 - January 28, 2015" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2014 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
PNG_STRING_NEWLINE;
# else
return "libpng version 1.5.21rc03 - December 21, 2014\
return "libpng version 1.5.22beta01 - January 28, 2015\
Copyright (c) 1998-2014 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
@@ -2081,17 +2082,20 @@ png_muldiv_warn(png_structp png_ptr, png_fixed_point a, png_int_32 times,
png_fixed_point
png_reciprocal(png_fixed_point a)
{
if (a != 0)
{
#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED
double r = floor(1E10/a+.5);
double r = floor(1E10/a+.5);
if (r <= 2147483647. && r >= -2147483648.)
return (png_fixed_point)r;
if (r <= 2147483647. && r >= -2147483648.)
return (png_fixed_point)r;
#else
png_fixed_point res;
png_fixed_point res;
if (png_muldiv(&res, 100000, 100000, a))
return res;
if (png_muldiv(&res, 100000, 100000, a))
return res;
#endif
}
return 0; /* error/overflow */
}
@@ -2126,23 +2130,26 @@ png_reciprocal2(png_fixed_point a, png_fixed_point b)
{
/* The required result is 1/a * 1/b; the following preserves accuracy. */
#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED
double r = 1E15/a;
r /= b;
r = floor(r+.5);
if (a != 0 && b != 0)
{
double r = 1E15/a;
r /= b;
r = floor(r+.5);
if (r <= 2147483647. && r >= -2147483648.)
return (png_fixed_point)r;
if (r <= 2147483647. && r >= -2147483648.)
return (png_fixed_point)r;
#else
/* This may overflow because the range of png_fixed_point isn't symmetric,
* but this API is only used for the product of file and screen gamma so it
* doesn't matter that the smallest number it can produce is 1/21474, not
* 1/100000
*/
png_fixed_point res = png_product2(a, b);
/* This may overflow because the range of png_fixed_point isn't
* symmetric, but this API is only used for the product of file and
* screen gamma so it doesn't matter that the smallest number it can
* produce is 1/21474, not 1/100000
*/
png_fixed_point res = png_product2(a, b);
if (res != 0)
return png_reciprocal(res);
if (res != 0)
return png_reciprocal(res);
#endif
}
return 0; /* overflow */
}

26
png.h
View File

@@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library
*
* libpng version 1.5.21rc03 - December 21, 2014
* libpng version 1.5.22beta01 - January 28, 2015
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -11,7 +11,7 @@
* Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
* libpng versions 0.97, January 1998, through 1.5.21rc03 - December 21, 2014: Glenn
* libpng versions 0.97, January 1998, through 1.5.22beta01 - January 28, 2015: Glenn
* See also "Contributing Authors", below.
*
* Note about libpng version numbers:
@@ -204,6 +204,8 @@
* 1.5.20 15 10520 15.so.15.20[.0]
* 1.5.21beta01-02 15 10521 15.so.15.21[.0]
* 1.5.21rc01-03 15 10521 15.so.15.21[.0]
* 1.5.21 15 10521 15.so.15.21[.0]
* 1.5.22beta01 15 10522 15.so.15.22[.0]
*
* Henceforth the source version will match the shared-library major
* and minor numbers; the shared-library major version number will be
@@ -235,7 +237,7 @@
*
* This code is released under the libpng license.
*
* libpng versions 1.2.6, August 15, 2004, through 1.5.21rc03, December 21, 2014, are
* libpng versions 1.2.6, August 15, 2004, through 1.5.22beta01, January 28, 2015, are
* Copyright (c) 2004, 2006-2014 Glenn Randers-Pehrson, and are
* distributed according to the same disclaimer and license as libpng-1.2.5
* with the following individual added to the list of Contributing Authors:
@@ -347,13 +349,13 @@
* Y2K compliance in libpng:
* =========================
*
* December 21, 2014
* January 28, 2015
*
* Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration.
*
* This is your unofficial assurance that libpng from version 0.71 and
* upward through 1.5.21rc03 are Y2K compliant. It is my belief that
* upward through 1.5.22beta01 are Y2K compliant. It is my belief that
* earlier versions were also Y2K compliant.
*
* Libpng only has two year fields. One is a 2-byte unsigned integer
@@ -414,9 +416,9 @@
*/
/* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.5.21rc03"
#define PNG_LIBPNG_VER_STRING "1.5.22beta01"
#define PNG_HEADER_VERSION_STRING \
" libpng version 1.5.21rc03 - December 21, 2014\n"
" libpng version 1.5.22beta01 - January 28, 2015\n"
#define PNG_LIBPNG_VER_SONUM 15
#define PNG_LIBPNG_VER_DLLNUM 15
@@ -424,13 +426,13 @@
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
#define PNG_LIBPNG_VER_MAJOR 1
#define PNG_LIBPNG_VER_MINOR 5
#define PNG_LIBPNG_VER_RELEASE 21
#define PNG_LIBPNG_VER_RELEASE 22
/* This should match the numeric part of the final component of
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
*/
#define PNG_LIBPNG_VER_BUILD 03
#define PNG_LIBPNG_VER_BUILD 01
/* Release Status */
#define PNG_LIBPNG_BUILD_ALPHA 1
@@ -447,7 +449,7 @@
#define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with
PNG_LIBPNG_BUILD_PRIVATE */
#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_RC
#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_BETA
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
* We must not include leading zeros.
@@ -455,7 +457,7 @@
* version 1.0.0 was mis-numbered 100 instead of 10000). From
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
*/
#define PNG_LIBPNG_VER 10521 /* 1.5.21 */
#define PNG_LIBPNG_VER 10522 /* 1.5.22 */
/* Library configuration: these options cannot be changed after
* the library has been built.
@@ -577,7 +579,7 @@ extern "C" {
/* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number.
*/
typedef char* png_libpng_version_1_5_21rc03;
typedef char* png_libpng_version_1_5_22beta01;
/* Three color definitions. The order of the red, green, and blue, (and the
* exact size) is not important, although the size of the fields need to

View File

@@ -1,7 +1,7 @@
/* pngconf.h - machine configurable file for libpng
*
* libpng version 1.5.21rc03 - December 21, 2014
* libpng version 1.5.22beta01 - January 28, 2015
*
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@@ -1,8 +1,8 @@
/* pngrtran.c - transforms the data in a row for PNG readers
*
* Last changed in libpng 1.5.19 [August 21, 2014]
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
* Last changed in libpng 1.5.22 [(PENDING RELEASE)]
* Copyright (c) 1998-2015 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -3341,11 +3341,17 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
for (i = 0; i < row_width; i++)
{
png_uint_16 red, green, blue, w;
#if 0 /* Coverity doesn't like this */
red = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2;
green = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2;
blue = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2;
#else
png_byte hi,lo;
hi=*(sp)++; lo=*(sp)++; red = (png_uint_16)((hi << 8) | (lo));
hi=*(sp)++; lo=*(sp)++; green = (png_uint_16)((hi << 8) | (lo));
hi=*(sp)++; lo=*(sp)++; blue = (png_uint_16)((hi << 8) | (lo));
#endif
if (red == green && red == blue)
{
if (png_ptr->gamma_16_table != NULL)

View File

@@ -1,8 +1,8 @@
/* pngrutil.c - utilities to read a PNG file
*
* Last changed in libpng 1.5.19 [August 21, 2014]
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
* Last changed in libpng 1.5.22 [(PENDING RELEASE)]
* Copyright (c) 1998-2015 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -2549,20 +2549,23 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
* compression type]". The compression flag shall be 0 (no compression) or
* 1 (compressed with method 0 - deflate.)
*/
if (comp_flag != 0 && comp_flag != 1)
if (comp_flag/*compressed*/ != 0)
{
png_warning(png_ptr, "invalid iTXt compression flag");
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = NULL;
return;
}
if (comp_flag != 1)
{
png_warning(png_ptr, "invalid iTXt compression flag");
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = NULL;
return;
}
if (comp_flag/*compressed*/ && comp_type != 0)
{
png_warning(png_ptr, "unknown iTXt compression type");
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = NULL;
return;
if (comp_type != 0)
{
png_warning(png_ptr, "unknown iTXt compression type");
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = NULL;
return;
}
}
for (lang_key = lang; *lang_key; lang_key++)

View File

@@ -1,8 +1,8 @@
/* pngset.c - storage of image information into info struct
*
* Last changed in libpng 1.5.20 [November 20, 2014]
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
* Last changed in libpng 1.5.22 [(PENDING RELEASE)]
* Copyright (c) 1998-2015 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -926,16 +926,19 @@ png_set_tRNS(png_structp png_ptr, png_infop info_ptr,
if (trans_color != NULL)
{
int sample_max = (1 << info_ptr->bit_depth);
if (info_ptr->bit_depth < 16)
{
unsigned int sample_max = (1U << info_ptr->bit_depth) - 1U;
if ((info_ptr->color_type == PNG_COLOR_TYPE_GRAY &&
(int)trans_color->gray > sample_max) ||
(info_ptr->color_type == PNG_COLOR_TYPE_RGB &&
((int)trans_color->red > sample_max ||
(int)trans_color->green > sample_max ||
(int)trans_color->blue > sample_max)))
png_warning(png_ptr,
"tRNS chunk has out-of-range samples for bit_depth");
if ((info_ptr->color_type == PNG_COLOR_TYPE_GRAY &&
trans_color->gray > sample_max) ||
(info_ptr->color_type == PNG_COLOR_TYPE_RGB &&
(trans_color->red > sample_max ||
trans_color->green > sample_max ||
trans_color->blue > sample_max)))
png_warning(png_ptr,
"tRNS chunk has out-of-range samples for bit_depth");
}
png_memcpy(&(info_ptr->trans_color), trans_color,
png_sizeof(png_color_16));

View File

@@ -1990,4 +1990,4 @@ main(void)
#endif
/* Generate a compiler error if there is an old png.h in the search path. */
typedef png_libpng_version_1_5_21rc03 Your_png_h_is_not_version_1_5_21rc03;
typedef png_libpng_version_1_5_22beta01 Your_png_h_is_not_version_1_5_22beta01;

View File

@@ -1,7 +1,7 @@
VisualStudio instructions
libpng version 1.5.21rc03 - December 21, 2014
libpng version 1.5.22beta01 - January 28, 2015
Copyright (c) 1998-2010 Glenn Randers-Pehrson

View File

@@ -2,7 +2,7 @@
<!--
* zlib.props - location of zlib source
*
* libpng version 1.5.21rc03 - December 21, 2014
* libpng version 1.5.22beta01 - January 28, 2015
*
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
*

View File

@@ -1,9 +1,9 @@
Makefiles for libpng version 1.5.21rc03 - December 21, 2014
Makefiles for libpng version 1.5.22beta01 - January 28, 2015
pnglibconf.h.prebuilt => Stores configuration settings
makefile.linux => Linux/ELF makefile
(gcc, creates libpng15.so.15.1.5.21rc03)
(gcc, creates libpng15.so.15.1.5.22beta01)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
ansi2knr (Requires ansi2knr.c from
@@ -34,12 +34,12 @@ pnglibconf.h.prebuilt => Stores configuration settings
makefile.os2 => OS/2 Makefile (gcc and emx, requires libpng.def)
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
makefile.sggcc => Silicon Graphics (gcc,
creates libpng15.so.15.1.5.21rc03)
creates libpng15.so.15.1.5.22beta01)
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
makefile.solaris => Solaris 2.X makefile (gcc,
creates libpng15.so.15.1.5.21rc03)
creates libpng15.so.15.1.5.22beta01)
makefile.so9 => Solaris 9 makefile (gcc,
creates libpng15.so.15.1.5.21rc03)
creates libpng15.so.15.1.5.22beta01)
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.sunos => Sun makefile
makefile.32sunu => Sun Ultra 32-bit makefile

View File

@@ -1,6 +1,6 @@
/* def.c - define format of libpng.def
*
* Last changed in libpng version 1.6.16 [(PENDING RELEASE)]
* Last changed in libpng version 1.6.16 [December 22, 2014]
* Copyright (c) 2011-2014 Glenn Randers-Pehrson
*
* This code is released under the libpng license.
@@ -21,7 +21,7 @@ PNG_DFN "OS2 DESCRIPTION "PNG image compression library""
PNG_DFN "OS2 CODE PRELOAD MOVEABLE DISCARDABLE"
PNG_DFN ""
PNG_DFN "EXPORTS"
PNG_DFN ";Version 1.5.21rc03"
PNG_DFN ";Version 1.5.22beta01"
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
PNG_DFN "@" SYMBOL_PREFIX "@@" name "@"

View File

@@ -11,7 +11,7 @@
# Modeled after libxml-config.
version=1.5.21rc03
version=1.5.22beta01
prefix=""
libdir=""
libs=""

View File

@@ -5,6 +5,6 @@ includedir=@includedir@/libpng15
Name: libpng
Description: Loads and saves PNG files
Version: 1.5.21rc03
Version: 1.5.22beta01
Libs: -L${libdir} -lpng15
Cflags: -I${includedir}

View File

@@ -23,7 +23,7 @@
VERMAJ = 1
VERMIN = 5
VERMIC = 21
VERMIC = 22
VER = $(VERMAJ).$(VERMIN).$(VERMIC)
NAME = libpng
PACKAGE = $(NAME)-$(VER)

View File

@@ -10,7 +10,7 @@
# Library name:
LIBNAME = libpng15
PNGMAJ = 15
RELEASE = 21
RELEASE = 22
# Shared library names:
LIBSO=$(LIBNAME).so

View File

@@ -18,7 +18,7 @@ exec_prefix=$(prefix)
# Library name:
LIBNAME = libpng15
PNGMAJ = 15
RELEASE = 21
RELEASE = 22
# Shared library names:
LIBSO=$(LIBNAME).dll

View File

@@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include/libpng15
LIB= png15
SHLIB_MAJOR= 0
SHLIB_MINOR= 1.5.21rc03
SHLIB_MINOR= 1.5.22beta01
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c

View File

@@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include
LIB= png
SHLIB_MAJOR= 15
SHLIB_MINOR= 1.5.21rc03
SHLIB_MINOR= 1.5.22beta01
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c

View File

@@ -11,7 +11,7 @@ LIBDIR= ${PREFIX}/lib
MANDIR= ${PREFIX}/man/cat
SHLIB_MAJOR= 15
SHLIB_MINOR= 1.5.21rc03
SHLIB_MINOR= 1.5.22beta01
LIB= png
SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \

View File

@@ -1,7 +1,7 @@
/* 1.5.21rc03 STANDARD API DEFINITION */
/* 1.5.22beta01 STANDARD API DEFINITION */
/* pnglibconf.h - library build configuration */
/* libpng version 1.5.21rc03 - December 21, 2014 */
/* libpng version 1.5.22beta01 - January 28, 2015 */
/* Copyright (c) 1998-2013 Glenn Randers-Pehrson */

View File

@@ -1,7 +1,7 @@
/* sym.c - define format of libpng.sym
*
* Last changed in libpng version 1.6.16 [(PENDING RELEASE)]
* Last changed in libpng version 1.6.16 [December 22, 2014]
* Copyright (c) 2011-2014 Glenn Randers-Pehrson
*
* This code is released under the libpng license.

View File

@@ -1,7 +1,7 @@
/* symbols.c - find all exported symbols
*
* Last changed in libpng version 1.6.16 [(PENDING RELEASE)]
* Last changed in libpng version 1.6.16 [December 22, 2014]
* Copyright (c) 2011-2014 Glenn Randers-Pehrson
*
* This code is released under the libpng license.

View File

@@ -1,4 +1,4 @@
;Version 1.5.21rc03
;Version 1.5.22beta01
;--------------------------------------------------------------
; LIBPNG symbol list as a Win32 DEF file
; Contains all the symbols that can be exported from libpng

View File

@@ -1,7 +1,7 @@
/* vers.c - define format of libpng.vers
*
* Last changed in libpng version 1.6.16 [(PENDING RELEASE)]
* Last changed in libpng version 1.6.16 [December 22, 2014]
* Copyright (c) 2011-2014 Glenn Randers-Pehrson
*
* This code is released under the libpng license.