mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng17] Merge recent changes to the manual and pngrutil.c from libpng-1.6.14beta04.
This commit is contained in:
parent
34e49ae1bc
commit
2799bf9a4f
34
INSTALL
34
INSTALL
@ -28,7 +28,9 @@ On Unix/Linux and similar systems, you can simply type
|
|||||||
make check
|
make check
|
||||||
make install
|
make install
|
||||||
|
|
||||||
and ignore the rest of this document.
|
and ignore the rest of this document. "/path" is the path to the directory
|
||||||
|
where you want to install the libpng "lib", "include", and "bin"
|
||||||
|
subdirectories.
|
||||||
|
|
||||||
II. Rebuilding the configure scripts
|
II. Rebuilding the configure scripts
|
||||||
|
|
||||||
@ -64,8 +66,8 @@ Or you can use one of the "projects" in the "projects" directory.
|
|||||||
|
|
||||||
Before installing libpng, you must first install zlib, if it
|
Before installing libpng, you must first install zlib, if it
|
||||||
is not already on your system. zlib can usually be found
|
is not already on your system. zlib can usually be found
|
||||||
wherever you got libpng. zlib can be placed in another directory,
|
wherever you got libpng; otherwise go to http://zlib.net. You can place
|
||||||
at the same level as libpng.
|
zlib in in the same directory as libpng or in another directory.
|
||||||
|
|
||||||
If your system already has a preinstalled zlib you will still need
|
If your system already has a preinstalled zlib you will still need
|
||||||
to have access to the zlib.h and zconf.h include files that
|
to have access to the zlib.h and zconf.h include files that
|
||||||
@ -93,6 +95,10 @@ If you want to use "cmake" (see www.cmake.org), type
|
|||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
|
|
||||||
|
As when using the simple configure method described above, "/path" points to
|
||||||
|
the installation directory where you want to put the libpng "lib", "include",
|
||||||
|
and "bin" subdirectories.
|
||||||
|
|
||||||
V. Directory structure
|
V. Directory structure
|
||||||
|
|
||||||
You can rename the directories that you downloaded (they
|
You can rename the directories that you downloaded (they
|
||||||
@ -322,11 +328,12 @@ unmodified, default, libpng API and thus would probably fail to link.
|
|||||||
These mechanisms still work in the configure build and in any makefile
|
These mechanisms still work in the configure build and in any makefile
|
||||||
build that builds pnglibconf.h, although the feature selection macros
|
build that builds pnglibconf.h, although the feature selection macros
|
||||||
have changed somewhat as described above. In 1.5.0, however, pngusr.h is
|
have changed somewhat as described above. In 1.5.0, however, pngusr.h is
|
||||||
processed only once, when the exported header file pnglibconf.h is built.
|
processed only once, at the time the exported header file pnglibconf.h is
|
||||||
pngconf.h no longer includes pngusr.h, therefore pngusr.h is ignored after the
|
built. pngconf.h no longer includes pngusr.h; therefore, pngusr.h is ignored
|
||||||
build of pnglibconf.h and it is never included in an application build.
|
after the build of pnglibconf.h and it is never included in an application
|
||||||
|
build.
|
||||||
|
|
||||||
The rarely used alternative of adding a list of feature macros to the
|
The formerly used alternative of adding a list of feature macros to the
|
||||||
CPPFLAGS setting in the build also still works; however, the macros will be
|
CPPFLAGS setting in the build also still works; however, the macros will be
|
||||||
copied to pnglibconf.h and this may produce macro redefinition warnings
|
copied to pnglibconf.h and this may produce macro redefinition warnings
|
||||||
when the individual C files are compiled.
|
when the individual C files are compiled.
|
||||||
@ -342,12 +349,19 @@ functioning awk called 'nawk'.
|
|||||||
|
|
||||||
Configuration options are now documented in scripts/pnglibconf.dfa. This
|
Configuration options are now documented in scripts/pnglibconf.dfa. This
|
||||||
file also includes dependency information that ensures a configuration is
|
file also includes dependency information that ensures a configuration is
|
||||||
consistent; that is, if a feature is switched off dependent features are
|
consistent; that is, if a feature is switched off, dependent features are
|
||||||
also removed. As a recommended alternative to using feature macros in
|
also switched off. As a recommended alternative to using feature macros in
|
||||||
pngusr.h a system builder may also define equivalent options in pngusr.dfa
|
pngusr.h a system builder may also define equivalent options in pngusr.dfa
|
||||||
(or, indeed, any file) and add that to the configuration by setting
|
(or, indeed, any file) and add that to the configuration by setting
|
||||||
DFA_XTRA to the file name. The makefiles in contrib/pngminim illustrate
|
DFA_XTRA to the file name. The makefiles in contrib/pngminim illustrate
|
||||||
how to do this, and a case where pngusr.h is still required.
|
how to do this, and also illustrate a case where pngusr.h is still required.
|
||||||
|
|
||||||
|
After you have built libpng, the definitions that were recorded in
|
||||||
|
pnglibconf.h are available to your application (pnglibconf.h is included
|
||||||
|
in png.h and gets installed alongside png.h and pngconf.h in your
|
||||||
|
$PREFIX/include directory). Do not edit pnglibconf.h after you have built
|
||||||
|
libpng, because than the settings would not accurately reflect the settings
|
||||||
|
that were used to build libpng.
|
||||||
|
|
||||||
XV. Configuring libpng for multiprocessing
|
XV. Configuring libpng for multiprocessing
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
libpng-manual.txt - A description on how to use and modify libpng
|
libpng-manual.txt - A description on how to use and modify libpng
|
||||||
|
|
||||||
libpng version 1.7.0beta36 - August 6, 2014
|
libpng version 1.7.0beta36 - September 27, 2014
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
<glennrp at users.sourceforge.net>
|
<glennrp at users.sourceforge.net>
|
||||||
Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
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:
|
Based on:
|
||||||
|
|
||||||
libpng versions 0.97, January 1998, through 1.7.0beta36 - August 6, 2014
|
libpng versions 0.97, January 1998, through 1.7.0beta36 - September 27, 2014
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||||
|
|
||||||
@ -5036,11 +5036,27 @@ Error detection in some chunks has improved; in particular the iCCP chunk
|
|||||||
reader now does pretty complete validation of the basic format. Some bad
|
reader now does pretty complete validation of the basic format. Some bad
|
||||||
profiles that were previously accepted are now accepted with a warning or
|
profiles that were previously accepted are now accepted with a warning or
|
||||||
rejected, depending upon the png_set_benign_errors() setting, in particular the
|
rejected, depending upon the png_set_benign_errors() setting, in particular the
|
||||||
very old broken Microsoft/HP 3144-byte sRGB profile. The PNG spec requirement
|
very old broken Microsoft/HP 3144-byte sRGB profile. Starting with
|
||||||
that only grayscale profiles may appear in images with color type 0 or 4 and
|
libpng-1.6.11, recognizing and checking sRGB profiles can be avoided by
|
||||||
that even if the image only contains gray pixels, only RGB profiles may appear
|
means of
|
||||||
in images with color type 2, 3, or 6, is now enforced. The sRGB chunk
|
|
||||||
is allowed to appear in images with any color type.
|
#if defined(PNG_SKIP_sRGB_CHECK_PROFILE) && \
|
||||||
|
defined(PNG_SET_OPTION_SUPPORTED)
|
||||||
|
png_set_option(png_ptr, PNG_SKIP_sRGB_CHECK_PROFILE,
|
||||||
|
PNG_OPTION_ON);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
It's not a good idea to do this if you are using the "simplified API",
|
||||||
|
which needs to be able to recognize an sRGB profile conveyed via the iCCP
|
||||||
|
chunk.
|
||||||
|
|
||||||
|
The PNG spec requirement that only grayscale profiles may appear in images
|
||||||
|
with color type 0 or 4 and that even if the image only contains gray pixels,
|
||||||
|
only RGB profiles may appear in images with color type 2, 3, or 6, is now
|
||||||
|
enforced. The sRGB chunk is allowed to appear in images with any color type
|
||||||
|
and is interpreted by libpng to convey a one-tracer-curve gray profile or a
|
||||||
|
three-tracer-curve RGB profile as appropriate.
|
||||||
|
|
||||||
|
|
||||||
Prior to libpng-1.6.0 a warning would be issued if the iTXt chunk contained
|
Prior to libpng-1.6.0 a warning would be issued if the iTXt chunk contained
|
||||||
an empty language field or an empty translated keyword. Both of these
|
an empty language field or an empty translated keyword. Both of these
|
||||||
@ -5239,12 +5255,15 @@ We mark all non-exported functions with "/* PRIVATE */"":
|
|||||||
}
|
}
|
||||||
|
|
||||||
The prototypes for non-exported functions (except for those in
|
The prototypes for non-exported functions (except for those in
|
||||||
pngtest) appear in
|
pngtest) appear in pngpriv.h above the comment that says
|
||||||
pngpriv.h
|
|
||||||
above the comment that says
|
|
||||||
|
|
||||||
/* Maintainer: Put new private prototypes here ^ */
|
/* Maintainer: Put new private prototypes here ^ */
|
||||||
|
|
||||||
|
To avoid polluting the global namespace, the names of all exported
|
||||||
|
functions and variables begin with "png_", and all publicly visible C
|
||||||
|
preprocessor macros begin with "PNG". We request that applications that
|
||||||
|
use libpng *not* begin any of their own symbols with either of these strings.
|
||||||
|
|
||||||
We put a space after the "sizeof" operator and we omit the
|
We put a space after the "sizeof" operator and we omit the
|
||||||
optional parentheses around its argument when the argument
|
optional parentheses around its argument when the argument
|
||||||
is an expression, not a type name, and we always enclose the
|
is an expression, not a type name, and we always enclose the
|
||||||
@ -5256,10 +5275,8 @@ sizeof operator, with its argument, in parentheses:
|
|||||||
Prior to libpng-1.6.0 we used a "png_sizeof()" macro, formatted as
|
Prior to libpng-1.6.0 we used a "png_sizeof()" macro, formatted as
|
||||||
though it were a function.
|
though it were a function.
|
||||||
|
|
||||||
To avoid polluting the global namespace, the names of all exported
|
Control keywords if, for, while, and switch are always followed by a space
|
||||||
functions and variables begin with "png_", and all publicly visible C
|
to distinguish them from function calls, which have no trailing space.
|
||||||
preprocessor macros begin with "PNG". We request that applications that
|
|
||||||
use libpng *not* begin any of their own symbols with either of these strings.
|
|
||||||
|
|
||||||
We put a space after each comma and after each semicolon
|
We put a space after each comma and after each semicolon
|
||||||
in "for" statements, and we put spaces before and after each
|
in "for" statements, and we put spaces before and after each
|
||||||
@ -5292,7 +5309,7 @@ Other rules can be inferred by inspecting the libpng source.
|
|||||||
|
|
||||||
XVII. Y2K Compliance in libpng
|
XVII. Y2K Compliance in libpng
|
||||||
|
|
||||||
August 6, 2014
|
September 27, 2014
|
||||||
|
|
||||||
Since the PNG Development group is an ad-hoc body, we can't make
|
Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
an official declaration.
|
an official declaration.
|
||||||
|
|||||||
55
libpng.3
55
libpng.3
@ -1,4 +1,4 @@
|
|||||||
.TH LIBPNG 3 "August 6, 2014"
|
.TH LIBPNG 3 "September 27, 2014"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0beta36
|
libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0beta36
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@ -494,7 +494,7 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng.
|
|||||||
.SH LIBPNG.TXT
|
.SH LIBPNG.TXT
|
||||||
libpng-manual.txt - A description on how to use and modify libpng
|
libpng-manual.txt - A description on how to use and modify libpng
|
||||||
|
|
||||||
libpng version 1.7.0beta36 - August 6, 2014
|
libpng version 1.7.0beta36 - September 27, 2014
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
<glennrp at users.sourceforge.net>
|
<glennrp at users.sourceforge.net>
|
||||||
Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||||
@ -505,7 +505,7 @@ libpng-manual.txt - A description on how to use and modify libpng
|
|||||||
|
|
||||||
Based on:
|
Based on:
|
||||||
|
|
||||||
libpng versions 0.97, January 1998, through 1.7.0beta36 - August 6, 2014
|
libpng versions 0.97, January 1998, through 1.7.0beta36 - September 27, 2014
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||||
|
|
||||||
@ -5530,11 +5530,27 @@ Error detection in some chunks has improved; in particular the iCCP chunk
|
|||||||
reader now does pretty complete validation of the basic format. Some bad
|
reader now does pretty complete validation of the basic format. Some bad
|
||||||
profiles that were previously accepted are now accepted with a warning or
|
profiles that were previously accepted are now accepted with a warning or
|
||||||
rejected, depending upon the png_set_benign_errors() setting, in particular the
|
rejected, depending upon the png_set_benign_errors() setting, in particular the
|
||||||
very old broken Microsoft/HP 3144-byte sRGB profile. The PNG spec requirement
|
very old broken Microsoft/HP 3144-byte sRGB profile. Starting with
|
||||||
that only grayscale profiles may appear in images with color type 0 or 4 and
|
libpng-1.6.11, recognizing and checking sRGB profiles can be avoided by
|
||||||
that even if the image only contains gray pixels, only RGB profiles may appear
|
means of
|
||||||
in images with color type 2, 3, or 6, is now enforced. The sRGB chunk
|
|
||||||
is allowed to appear in images with any color type.
|
#if defined(PNG_SKIP_sRGB_CHECK_PROFILE) && \
|
||||||
|
defined(PNG_SET_OPTION_SUPPORTED)
|
||||||
|
png_set_option(png_ptr, PNG_SKIP_sRGB_CHECK_PROFILE,
|
||||||
|
PNG_OPTION_ON);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
It's not a good idea to do this if you are using the "simplified API",
|
||||||
|
which needs to be able to recognize an sRGB profile conveyed via the iCCP
|
||||||
|
chunk.
|
||||||
|
|
||||||
|
The PNG spec requirement that only grayscale profiles may appear in images
|
||||||
|
with color type 0 or 4 and that even if the image only contains gray pixels,
|
||||||
|
only RGB profiles may appear in images with color type 2, 3, or 6, is now
|
||||||
|
enforced. The sRGB chunk is allowed to appear in images with any color type
|
||||||
|
and is interpreted by libpng to convey a one-tracer-curve gray profile or a
|
||||||
|
three-tracer-curve RGB profile as appropriate.
|
||||||
|
|
||||||
|
|
||||||
Prior to libpng-1.6.0 a warning would be issued if the iTXt chunk contained
|
Prior to libpng-1.6.0 a warning would be issued if the iTXt chunk contained
|
||||||
an empty language field or an empty translated keyword. Both of these
|
an empty language field or an empty translated keyword. Both of these
|
||||||
@ -5733,12 +5749,15 @@ We mark all non-exported functions with "/* PRIVATE */"":
|
|||||||
}
|
}
|
||||||
|
|
||||||
The prototypes for non-exported functions (except for those in
|
The prototypes for non-exported functions (except for those in
|
||||||
pngtest) appear in
|
pngtest) appear in pngpriv.h above the comment that says
|
||||||
pngpriv.h
|
|
||||||
above the comment that says
|
|
||||||
|
|
||||||
/* Maintainer: Put new private prototypes here ^ */
|
/* Maintainer: Put new private prototypes here ^ */
|
||||||
|
|
||||||
|
To avoid polluting the global namespace, the names of all exported
|
||||||
|
functions and variables begin with "png_", and all publicly visible C
|
||||||
|
preprocessor macros begin with "PNG". We request that applications that
|
||||||
|
use libpng *not* begin any of their own symbols with either of these strings.
|
||||||
|
|
||||||
We put a space after the "sizeof" operator and we omit the
|
We put a space after the "sizeof" operator and we omit the
|
||||||
optional parentheses around its argument when the argument
|
optional parentheses around its argument when the argument
|
||||||
is an expression, not a type name, and we always enclose the
|
is an expression, not a type name, and we always enclose the
|
||||||
@ -5750,10 +5769,8 @@ sizeof operator, with its argument, in parentheses:
|
|||||||
Prior to libpng-1.6.0 we used a "png_sizeof()" macro, formatted as
|
Prior to libpng-1.6.0 we used a "png_sizeof()" macro, formatted as
|
||||||
though it were a function.
|
though it were a function.
|
||||||
|
|
||||||
To avoid polluting the global namespace, the names of all exported
|
Control keywords if, for, while, and switch are always followed by a space
|
||||||
functions and variables begin with "png_", and all publicly visible C
|
to distinguish them from function calls, which have no trailing space.
|
||||||
preprocessor macros begin with "PNG". We request that applications that
|
|
||||||
use libpng *not* begin any of their own symbols with either of these strings.
|
|
||||||
|
|
||||||
We put a space after each comma and after each semicolon
|
We put a space after each comma and after each semicolon
|
||||||
in "for" statements, and we put spaces before and after each
|
in "for" statements, and we put spaces before and after each
|
||||||
@ -5786,7 +5803,7 @@ Other rules can be inferred by inspecting the libpng source.
|
|||||||
|
|
||||||
.SH XVII. Y2K Compliance in libpng
|
.SH XVII. Y2K Compliance in libpng
|
||||||
|
|
||||||
August 6, 2014
|
September 27, 2014
|
||||||
|
|
||||||
Since the PNG Development group is an ad-hoc body, we can't make
|
Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
an official declaration.
|
an official declaration.
|
||||||
@ -6056,7 +6073,7 @@ possible without all of you.
|
|||||||
|
|
||||||
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
||||||
|
|
||||||
Libpng version 1.7.0beta36 - August 6, 2014:
|
Libpng version 1.7.0beta36 - September 27, 2014:
|
||||||
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
||||||
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
|
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
|
||||||
|
|
||||||
@ -6079,7 +6096,7 @@ this sentence.
|
|||||||
|
|
||||||
This code is released under the libpng license.
|
This code is released under the libpng license.
|
||||||
|
|
||||||
libpng versions 1.2.6, August 15, 2004, through 1.7.0beta36, August 6, 2014, are
|
libpng versions 1.2.6, August 15, 2004, through 1.7.0beta36, September 27, 2014, are
|
||||||
Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are
|
Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are
|
||||||
distributed according to the same disclaimer and license as libpng-1.2.5
|
distributed according to the same disclaimer and license as libpng-1.2.5
|
||||||
with the following individual added to the list of Contributing Authors
|
with the following individual added to the list of Contributing Authors
|
||||||
@ -6178,7 +6195,7 @@ certification mark of the Open Source Initiative.
|
|||||||
|
|
||||||
Glenn Randers-Pehrson
|
Glenn Randers-Pehrson
|
||||||
glennrp at users.sourceforge.net
|
glennrp at users.sourceforge.net
|
||||||
August 6, 2014
|
September 27, 2014
|
||||||
|
|
||||||
.\" end of man page
|
.\" end of man page
|
||||||
|
|
||||||
|
|||||||
28
pngrutil.c
28
pngrutil.c
@ -501,7 +501,7 @@ png_inflate(png_structrp png_ptr, png_uint_32 owner, int finish,
|
|||||||
* end of the output buffer.
|
* end of the output buffer.
|
||||||
*/
|
*/
|
||||||
ret = inflate(&png_ptr->zstream, avail_out > 0 ? Z_NO_FLUSH :
|
ret = inflate(&png_ptr->zstream, avail_out > 0 ? Z_NO_FLUSH :
|
||||||
(finish ? Z_FINISH : Z_SYNC_FLUSH));
|
(finish ? Z_FINISH : Z_SYNC_FLUSH));
|
||||||
} while (ret == Z_OK);
|
} while (ret == Z_OK);
|
||||||
|
|
||||||
/* For safety kill the local buffer pointer now */
|
/* For safety kill the local buffer pointer now */
|
||||||
@ -996,7 +996,7 @@ png_handle_PLTE(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
|
|||||||
*/
|
*/
|
||||||
#ifdef PNG_READ_tRNS_SUPPORTED
|
#ifdef PNG_READ_tRNS_SUPPORTED
|
||||||
if (png_ptr->num_trans > 0 ||
|
if (png_ptr->num_trans > 0 ||
|
||||||
(info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS) != 0))
|
(info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS) != 0))
|
||||||
{
|
{
|
||||||
/* Cancel this because otherwise it would be used if the transforms
|
/* Cancel this because otherwise it would be used if the transforms
|
||||||
* require it. Don't cancel the 'valid' flag because this would prevent
|
* require it. Don't cancel the 'valid' flag because this would prevent
|
||||||
@ -1304,9 +1304,9 @@ png_handle_iCCP(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
|
|||||||
* chunk is just ignored, so does not invalidate the color space. An
|
* chunk is just ignored, so does not invalidate the color space. An
|
||||||
* alternative is to set the 'invalid' flags at the start of this routine
|
* alternative is to set the 'invalid' flags at the start of this routine
|
||||||
* and only clear them in they were not set before and all the tests pass.
|
* and only clear them in they were not set before and all the tests pass.
|
||||||
* The minimum 'deflate' stream is assumed to be just the 2 byte header and 4
|
* The minimum 'deflate' stream is assumed to be just the 2 byte header and
|
||||||
* byte checksum. The keyword must be one character and there is a
|
* 4 byte checksum. The keyword must be at least one character and there is
|
||||||
* terminator (0) byte and the compression method.
|
* a terminator (0) byte and the compression method.
|
||||||
*/
|
*/
|
||||||
if (length < 9)
|
if (length < 9)
|
||||||
{
|
{
|
||||||
@ -1581,7 +1581,7 @@ png_handle_sPLT(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
|
|||||||
if (--png_ptr->user_chunk_cache_max == 1)
|
if (--png_ptr->user_chunk_cache_max == 1)
|
||||||
{
|
{
|
||||||
/* Warn the first time */
|
/* Warn the first time */
|
||||||
png_chunk_benign_error(png_ptr, "chunk cache full");
|
png_chunk_benign_error(png_ptr, "no space in chunk cache");
|
||||||
png_crc_finish(png_ptr, length);
|
png_crc_finish(png_ptr, length);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -2371,7 +2371,7 @@ png_handle_tEXt(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
|
|||||||
if (--png_ptr->user_chunk_cache_max == 1)
|
if (--png_ptr->user_chunk_cache_max == 1)
|
||||||
{
|
{
|
||||||
png_crc_finish(png_ptr, length);
|
png_crc_finish(png_ptr, length);
|
||||||
png_chunk_benign_error(png_ptr, "chunk cache full");
|
png_chunk_benign_error(png_ptr, "no space in chunk cache");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2450,7 +2450,7 @@ png_handle_zTXt(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
|
|||||||
if (--png_ptr->user_chunk_cache_max == 1)
|
if (--png_ptr->user_chunk_cache_max == 1)
|
||||||
{
|
{
|
||||||
png_crc_finish(png_ptr, length);
|
png_crc_finish(png_ptr, length);
|
||||||
png_chunk_benign_error(png_ptr, "chunk cache full");
|
png_chunk_benign_error(png_ptr, "no space in chunk cache");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2559,7 +2559,7 @@ png_handle_iTXt(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
|
|||||||
if (--png_ptr->user_chunk_cache_max == 1)
|
if (--png_ptr->user_chunk_cache_max == 1)
|
||||||
{
|
{
|
||||||
png_crc_finish(png_ptr, length);
|
png_crc_finish(png_ptr, length);
|
||||||
png_chunk_benign_error(png_ptr, "chunk cache full");
|
png_chunk_benign_error(png_ptr, "no space in chunk cache");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2628,7 +2628,7 @@ png_handle_iTXt(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
|
|||||||
/* prefix_length should now be at the trailing '\0' of the translated
|
/* prefix_length should now be at the trailing '\0' of the translated
|
||||||
* keyword, but it may already be over the end. None of this arithmetic
|
* keyword, but it may already be over the end. None of this arithmetic
|
||||||
* can overflow because chunks are at most 2^31 bytes long, but on 16-bit
|
* can overflow because chunks are at most 2^31 bytes long, but on 16-bit
|
||||||
* systems the available allocaton may overflow.
|
* systems the available allocation may overflow.
|
||||||
*/
|
*/
|
||||||
++prefix_length;
|
++prefix_length;
|
||||||
|
|
||||||
@ -2660,7 +2660,7 @@ png_handle_iTXt(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
|
|||||||
|
|
||||||
buffer[uncompressed_length+prefix_length] = 0;
|
buffer[uncompressed_length+prefix_length] = 0;
|
||||||
|
|
||||||
if (compressed != 0)
|
if (compressed == 0)
|
||||||
text.compression = PNG_ITXT_COMPRESSION_NONE;
|
text.compression = PNG_ITXT_COMPRESSION_NONE;
|
||||||
|
|
||||||
else
|
else
|
||||||
@ -2884,7 +2884,7 @@ png_handle_unknown(png_structrp png_ptr, png_inforp info_ptr,
|
|||||||
{
|
{
|
||||||
case 2:
|
case 2:
|
||||||
png_ptr->user_chunk_cache_max = 1;
|
png_ptr->user_chunk_cache_max = 1;
|
||||||
png_chunk_benign_error(png_ptr, "chunk cache full");
|
png_chunk_benign_error(png_ptr, "no space in chunk cache");
|
||||||
/* FALL THROUGH */
|
/* FALL THROUGH */
|
||||||
case 1:
|
case 1:
|
||||||
/* NOTE: prior to 1.6.0 this case resulted in an unknown critical
|
/* NOTE: prior to 1.6.0 this case resulted in an unknown critical
|
||||||
@ -3165,7 +3165,7 @@ png_combine_row(png_const_structrp png_ptr, png_bytep dp, int display)
|
|||||||
#endif /* !PNG_USE_COMPILE_TIME_MASKS */
|
#endif /* !PNG_USE_COMPILE_TIME_MASKS */
|
||||||
|
|
||||||
/* Use the appropriate mask to copy the required bits. In some cases
|
/* Use the appropriate mask to copy the required bits. In some cases
|
||||||
* the byte mask will be 0 or 0xff, optimize these cases. row_width is
|
* the byte mask will be 0 or 0xff; optimize these cases. row_width is
|
||||||
* the number of pixels, but the code copies bytes, so it is necessary
|
* the number of pixels, but the code copies bytes, so it is necessary
|
||||||
* to special case the end.
|
* to special case the end.
|
||||||
*/
|
*/
|
||||||
@ -3304,7 +3304,7 @@ png_combine_row(png_const_structrp png_ptr, png_bytep dp, int display)
|
|||||||
/* This can only be the RGB case, so each copy is exactly one
|
/* This can only be the RGB case, so each copy is exactly one
|
||||||
* pixel and it is not necessary to check for a partial copy.
|
* pixel and it is not necessary to check for a partial copy.
|
||||||
*/
|
*/
|
||||||
for(;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
dp[0] = sp[0], dp[1] = sp[1], dp[2] = sp[2];
|
dp[0] = sp[0], dp[1] = sp[1], dp[2] = sp[2];
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user