[libpng17] Port recent /*SAFE*/ comments and manual changes from libpng16

This commit is contained in:
Glenn Randers-Pehrson 2013-07-15 10:28:48 -05:00
parent bb06552075
commit 394bc6cdee
6 changed files with 34 additions and 18 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.7.0beta17 - July 5, 2013
Libpng 1.7.0beta17 - July 15, 2013
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.
@ -343,7 +343,10 @@ Version 1.7.0beta16 [July 5, 2013]
Ported ARM no-read patch from libpng16.
Ported pngfix.c patches from libpng16.
Version 1.7.0beta17 [July 5, 2013]
Version 1.7.0beta17 [July 15, 2013]
Revised manual about changes in iTXt chunk handling made in libpng-1.6.0.
Added "/* SAFE */" comments in pngrutil.c and pngrtran.c where warnings
may be erroneously issued by code-checking applications.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -4046,7 +4046,9 @@ Version 1.6.0beta17 [March 10, 2012]
Deflate/inflate was reworked to move common zlib calls into single
functions [rw]util.c. A new shared keyword check routine was also added
and the 'zbuf' is no longer allocated on progressive read. It is now
possible to call png_inflate() incrementally.
possible to call png_inflate() incrementally. A warning is no longer
issued if the language tag or translated keyword in the iTXt chunk
has zero length.
If benign errors are disabled use maximum window on ancilliary inflate.
This works round a bug introduced in 1.5.4 where compressed ancillary
chunks could end up with a too-small windowBits value in the deflate
@ -4631,7 +4633,10 @@ Version 1.7.0beta16 [July 5, 2013]
Ported ARM no-read patch from libpng16.
Ported pngfix.c patches from libpng16.
Version 1.7.0beta17 [July 5, 2013]
Version 1.7.0beta17 [July 15, 2013]
Revised manual about changes in iTXt chunk handling made in libpng-1.6.0.
Added "/* SAFE */" comments in pngrutil.c and pngrtran.c where warnings
may be erroneously issued by code-checking applications.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -1,6 +1,6 @@
libpng-manual.txt - A description on how to use and modify libpng
libpng version 1.7.0beta17 - July 5, 2013
libpng version 1.7.0beta17 - July 15, 2013
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2013 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.7.0beta17 - July 5, 2013
libpng versions 0.97, January 1998, through 1.7.0beta17 - July 15, 2013
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2013 Glenn Randers-Pehrson
@ -2288,7 +2288,7 @@ For a more compact example of reading a PNG image, see the file example.c.
Reading PNG files progressively
The progressive reader is slightly different then the non-progressive
The progressive reader is slightly different from the non-progressive
reader. Instead of calling png_read_info(), png_read_rows(), and
png_read_end(), you make one call to png_process_data(), which calls
callbacks when it has the info, a row, or the end of the image. You
@ -5005,6 +5005,10 @@ 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.
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
are allowed by the PNG specification, so these warnings are no longer issued.
The library now issues an error if the application attempts to set a
transform after it calls png_read_update_info().
@ -5236,7 +5240,7 @@ Other rules can be inferred by inspecting the libpng source.
XVII. Y2K Compliance in libpng
July 5, 2013
July 15, 2013
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.

View File

@ -1,4 +1,4 @@
.TH LIBPNG 3 "July 5, 2013"
.TH LIBPNG 3 "July 15, 2013"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0beta17
.SH SYNOPSIS
@ -494,7 +494,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.7.0beta17 - July 5, 2013
libpng version 1.7.0beta17 - July 15, 2013
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2013 Glenn Randers-Pehrson
@ -505,7 +505,7 @@ libpng-manual.txt - A description on how to use and modify libpng
Based on:
libpng versions 0.97, January 1998, through 1.7.0beta17 - July 5, 2013
libpng versions 0.97, January 1998, through 1.7.0beta17 - July 15, 2013
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2013 Glenn Randers-Pehrson
@ -2782,7 +2782,7 @@ For a more compact example of reading a PNG image, see the file example.c.
.SS Reading PNG files progressively
The progressive reader is slightly different then the non-progressive
The progressive reader is slightly different from the non-progressive
reader. Instead of calling png_read_info(), png_read_rows(), and
png_read_end(), you make one call to png_process_data(), which calls
callbacks when it has the info, a row, or the end of the image. You
@ -5500,6 +5500,10 @@ 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.
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
are allowed by the PNG specification, so these warnings are no longer issued.
The library now issues an error if the application attempts to set a
transform after it calls png_read_update_info().
@ -5731,7 +5735,7 @@ Other rules can be inferred by inspecting the libpng source.
.SH XVII. Y2K Compliance in libpng
July 5, 2013
July 15, 2013
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
@ -6001,7 +6005,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
Libpng version 1.7.0beta17 - July 5, 2013:
Libpng version 1.7.0beta17 - July 15, 2013:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
@ -6024,7 +6028,7 @@ this sentence.
This code is released under the libpng license.
libpng versions 1.2.6, August 15, 2004, through 1.7.0beta17, July 5, 2013, are
libpng versions 1.2.6, August 15, 2004, through 1.7.0beta17, July 15, 2013, are
Copyright (c) 2004,2006-2007 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
@ -6123,7 +6127,7 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
July 5, 2013
July 15, 2013
.\" end of man page

View File

@ -151,7 +151,7 @@ png_process_some_data(png_structrp png_ptr, png_inforp info_ptr)
void /* PRIVATE */
png_push_read_sig(png_structrp png_ptr, png_inforp info_ptr)
{
png_size_t num_checked = png_ptr->sig_bytes,
png_size_t num_checked = png_ptr->sig_bytes, /* SAFE, does not exceed 8 */
num_to_check = 8 - num_checked;
if (png_ptr->buffer_size < num_to_check)

View File

@ -3654,7 +3654,7 @@ png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
for (i = 0; i < row_info->width; i++)
{
png_byte v[8];
png_byte v[8]; /* SAFE; pixel_depth does not exceed 64 */
int j;
memcpy(v, sp, pixel_bytes);