mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng17] Allow calling png_get_IHDR() with NULL arguments (Reuben Hawkins).
This commit is contained in:
5
ANNOUNCE
5
ANNOUNCE
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Libpng 1.7.0beta46 - January 1, 2015
|
Libpng 1.7.0beta46 - January 2, 2015
|
||||||
|
|
||||||
This is not intended to be a public release. It will be replaced
|
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.
|
within a few weeks by a public version or by another test version.
|
||||||
@@ -681,10 +681,11 @@ Version 1.7.0beta45 [December 28, 2014]
|
|||||||
png_read_row to skip the unnecessary row de-interlace stuff.
|
png_read_row to skip the unnecessary row de-interlace stuff.
|
||||||
Added testing of png_set_packing() to pngvalid.c
|
Added testing of png_set_packing() to pngvalid.c
|
||||||
|
|
||||||
Version 1.7.0beta46 [January 1, 2015]
|
Version 1.7.0beta46 [January 2, 2015]
|
||||||
Regenerated configure scripts in the tar distributions with libtool-2.4.4
|
Regenerated configure scripts in the tar distributions with libtool-2.4.4
|
||||||
Implement previously untested cases of libpng transforms in pngvalid.c
|
Implement previously untested cases of libpng transforms in pngvalid.c
|
||||||
Fixed byte order in 2-byte filler, in png_do_read_filler().
|
Fixed byte order in 2-byte filler, in png_do_read_filler().
|
||||||
|
Allow user to call png_get_IHDR() with NULL arguments (Reuben Hawkins).
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
|||||||
3
CHANGES
3
CHANGES
@@ -4970,10 +4970,11 @@ Version 1.7.0beta45 [December 28, 2014]
|
|||||||
png_read_row to skip the unnecessary row de-interlace stuff.
|
png_read_row to skip the unnecessary row de-interlace stuff.
|
||||||
Added testing of png_set_packing() to pngvalid.c
|
Added testing of png_set_packing() to pngvalid.c
|
||||||
|
|
||||||
Version 1.7.0beta46 [January 1, 2015]
|
Version 1.7.0beta46 [January 2, 2015]
|
||||||
Regenerated configure scripts in the tar distributions with libtool-2.4.4
|
Regenerated configure scripts in the tar distributions with libtool-2.4.4
|
||||||
Implement previously untested cases of libpng transforms in pngvalid.c
|
Implement previously untested cases of libpng transforms in pngvalid.c
|
||||||
Fixed byte order in 2-byte filler, in png_do_read_filler().
|
Fixed byte order in 2-byte filler, in png_do_read_filler().
|
||||||
|
Allow user to call png_get_IHDR() with NULL arguments (Reuben Hawkins).
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
|||||||
@@ -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.0beta46 - January 1, 2015
|
libpng version 1.7.0beta46 - January 2, 2015
|
||||||
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-2015 Glenn Randers-Pehrson
|
Copyright (c) 1998-2015 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.0beta46 - January 1, 2015
|
libpng versions 0.97, January 1998, through 1.7.0beta46 - January 2, 2015
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
Copyright (c) 1998-2015 Glenn Randers-Pehrson
|
Copyright (c) 1998-2015 Glenn Randers-Pehrson
|
||||||
|
|
||||||
@@ -1266,16 +1266,17 @@ in until png_read_end() has read the chunk data following the image.
|
|||||||
the PNG datastream is embedded in
|
the PNG datastream is embedded in
|
||||||
a MNG-1.0 datastream)
|
a MNG-1.0 datastream)
|
||||||
|
|
||||||
Any or all of interlace_type, compression_type, or
|
Any or all of color_tye, bit_depth, interlace_type,
|
||||||
filter_method can be NULL if you are
|
compression_type, or filter_method can be NULL if you
|
||||||
not interested in their values.
|
are not interested in their values.
|
||||||
|
|
||||||
Note that png_get_IHDR() returns 32-bit data into
|
Note that png_get_IHDR() returns png_uint_32 data into
|
||||||
the application's width and height variables.
|
the application's width and height variables.
|
||||||
This is an unsafe situation if these are 16-bit
|
This is an unsafe situation if these are 16-bit
|
||||||
variables. In such situations, the
|
variables, or if they are 32-bit variables on a 64-bit
|
||||||
png_get_image_width() and png_get_image_height()
|
platform. In such situations, the png_get_image_width()
|
||||||
functions described below are safer.
|
and png_get_image_height() functions described below are
|
||||||
|
safer.
|
||||||
|
|
||||||
width = png_get_image_width(png_ptr,
|
width = png_get_image_width(png_ptr,
|
||||||
info_ptr);
|
info_ptr);
|
||||||
@@ -5320,7 +5321,7 @@ Other rules can be inferred by inspecting the libpng source.
|
|||||||
|
|
||||||
XVII. Y2K Compliance in libpng
|
XVII. Y2K Compliance in libpng
|
||||||
|
|
||||||
January 1, 2015
|
January 2, 2015
|
||||||
|
|
||||||
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.
|
||||||
|
|||||||
29
libpng.3
29
libpng.3
@@ -1,4 +1,4 @@
|
|||||||
.TH LIBPNG 3 "January 1, 2015"
|
.TH LIBPNG 3 "January 2, 2015"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0beta46
|
libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0beta46
|
||||||
.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.0beta46 - January 1, 2015
|
libpng version 1.7.0beta46 - January 2, 2015
|
||||||
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-2015 Glenn Randers-Pehrson
|
Copyright (c) 1998-2015 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.0beta46 - January 1, 2015
|
libpng versions 0.97, January 1998, through 1.7.0beta46 - January 2, 2015
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
Copyright (c) 1998-2015 Glenn Randers-Pehrson
|
Copyright (c) 1998-2015 Glenn Randers-Pehrson
|
||||||
|
|
||||||
@@ -1760,16 +1760,17 @@ in until png_read_end() has read the chunk data following the image.
|
|||||||
the PNG datastream is embedded in
|
the PNG datastream is embedded in
|
||||||
a MNG-1.0 datastream)
|
a MNG-1.0 datastream)
|
||||||
|
|
||||||
Any or all of interlace_type, compression_type, or
|
Any or all of color_tye, bit_depth, interlace_type,
|
||||||
filter_method can be NULL if you are
|
compression_type, or filter_method can be NULL if you
|
||||||
not interested in their values.
|
are not interested in their values.
|
||||||
|
|
||||||
Note that png_get_IHDR() returns 32-bit data into
|
Note that png_get_IHDR() returns png_uint_32 data into
|
||||||
the application's width and height variables.
|
the application's width and height variables.
|
||||||
This is an unsafe situation if these are 16-bit
|
This is an unsafe situation if these are 16-bit
|
||||||
variables. In such situations, the
|
variables, or if they are 32-bit variables on a 64-bit
|
||||||
png_get_image_width() and png_get_image_height()
|
platform. In such situations, the png_get_image_width()
|
||||||
functions described below are safer.
|
and png_get_image_height() functions described below are
|
||||||
|
safer.
|
||||||
|
|
||||||
width = png_get_image_width(png_ptr,
|
width = png_get_image_width(png_ptr,
|
||||||
info_ptr);
|
info_ptr);
|
||||||
@@ -5814,7 +5815,7 @@ Other rules can be inferred by inspecting the libpng source.
|
|||||||
|
|
||||||
.SH XVII. Y2K Compliance in libpng
|
.SH XVII. Y2K Compliance in libpng
|
||||||
|
|
||||||
January 1, 2015
|
January 2, 2015
|
||||||
|
|
||||||
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.
|
||||||
@@ -6084,7 +6085,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.0beta46 - January 1, 2015:
|
Libpng version 1.7.0beta46 - January 2, 2015:
|
||||||
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).
|
||||||
|
|
||||||
@@ -6107,7 +6108,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.0beta46, January 1, 2015, are
|
libpng versions 1.2.6, August 15, 2004, through 1.7.0beta46, January 2, 2015, 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
|
||||||
@@ -6206,7 +6207,7 @@ certification mark of the Open Source Initiative.
|
|||||||
|
|
||||||
Glenn Randers-Pehrson
|
Glenn Randers-Pehrson
|
||||||
glennrp at users.sourceforge.net
|
glennrp at users.sourceforge.net
|
||||||
January 1, 2015
|
January 2, 2015
|
||||||
|
|
||||||
.\" end of man page
|
.\" end of man page
|
||||||
|
|
||||||
|
|||||||
18
pngget.c
18
pngget.c
@@ -799,14 +799,20 @@ png_get_IHDR(png_const_structrp png_ptr, png_const_inforp info_ptr,
|
|||||||
{
|
{
|
||||||
png_debug1(1, "in %s retrieval function", "IHDR");
|
png_debug1(1, "in %s retrieval function", "IHDR");
|
||||||
|
|
||||||
if (png_ptr == NULL || info_ptr == NULL || width == NULL ||
|
if (png_ptr == NULL || info_ptr == NULL)
|
||||||
height == NULL || bit_depth == NULL || color_type == NULL)
|
|
||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
*width = info_ptr->width;
|
if (width != NULL)
|
||||||
*height = info_ptr->height;
|
*width = info_ptr->width;
|
||||||
*bit_depth = info_ptr->bit_depth;
|
|
||||||
*color_type = info_ptr->color_type;
|
if (height != NULL)
|
||||||
|
*height = info_ptr->height;
|
||||||
|
|
||||||
|
if (bit_depth != NULL)
|
||||||
|
*bit_depth = info_ptr->bit_depth;
|
||||||
|
|
||||||
|
if (color_type != NULL)
|
||||||
|
*color_type = info_ptr->color_type;
|
||||||
|
|
||||||
if (compression_type != NULL)
|
if (compression_type != NULL)
|
||||||
*compression_type = info_ptr->compression_type;
|
*compression_type = info_ptr->compression_type;
|
||||||
|
|||||||
Reference in New Issue
Block a user