mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 408429 - "Update libpng to version 1.2.24" [p=glennrp@gmail.com (Glenn Randers-Pehrson) r=tor sr=stuart a1.9=schrep]
This commit is contained in:
parent
a2bce09846
commit
6b63cb5ed0
@ -1480,7 +1480,7 @@ version 1.2.9beta5 [March 4, 2006]
|
||||
Restored scripts/makefile.elf which was inadvertently deleted.
|
||||
|
||||
version 1.2.9beta6 [March 6, 2006]
|
||||
Fixed typo (23) in configuration files.
|
||||
Fixed typo (RELEASE) in configuration files.
|
||||
|
||||
version 1.2.9beta7 [March 7, 2006]
|
||||
Removed libpng.vers and libpng.sym from libpng12_la_SOURCES in Makefile.am
|
||||
@ -1669,7 +1669,7 @@ version 1.2.15rc2 [December 21, 2006]
|
||||
Added scripts/makefile.nommx
|
||||
|
||||
version 1.2.15rc3 [December 25, 2006]
|
||||
Fixed shared library numbering error that was intruduced in 1.2.15beta6.
|
||||
Fixed shared library numbering error that was introduced in 1.2.15beta6.
|
||||
|
||||
version 1.2.15rc4 [December 27, 2006]
|
||||
Fixed handling of rgb_to_gray when png_ptr->color.gray isn't set.
|
||||
@ -1897,6 +1897,7 @@ version 1.0.27 and 1.2.19 [August 18, 2007]
|
||||
|
||||
version 1.2.20beta01 [August 19, 2007]
|
||||
Fixed problem with compiling pnggccrd.c on Intel-Apple platforms.
|
||||
Changed png_malloc() to png_malloc_warn() in png_set_sPLT().
|
||||
Added PNG_NO_ERROR_TEXT feature, with demo in contrib/pngminim
|
||||
Removed define PNG_WARN_UNINITIALIZED_ROW 1 /* 0: warning; 1: error */
|
||||
because it caused some trouble.
|
||||
@ -2010,6 +2011,27 @@ version 1.2.23rc01 [November 2, 2007]
|
||||
version 1.2.23 [November 6, 2007]
|
||||
No changes.
|
||||
|
||||
version 1.2.24beta01 [November 19, 2007]
|
||||
Moved misplaced test for malloc failure in png_set_sPLT(). This bug was
|
||||
introduced in libpng-1.2.20beta01.
|
||||
Ifdef out avg_row etc from png.h and pngwrite.c when PNG_NO_WRITE_FILTER
|
||||
Do not use png_ptr->free_fn and png_ptr->mem_fn in png_destroy_read_struct()
|
||||
when png_ptr is NULL (Marshall Clow).
|
||||
Updated handling of symbol prefixes in Makefile.am and configure.ac (Mike
|
||||
Frysinger).
|
||||
|
||||
version 1.2.24beta02 [November 30, 2007]
|
||||
Removed a useless test and fixed incorrect test in png_set_cHRM_fixed()
|
||||
(David Hill).
|
||||
|
||||
version 1.2.24rc01 [December 7, 2007]
|
||||
No changes.
|
||||
|
||||
version 1.2.24 [December 14, 2007]
|
||||
Make sure not to redefine _BSD_SOURCE in pngconf.h
|
||||
Revised gather.sh and makefile.std in contrib/pngminim to avoid compiling
|
||||
unused files.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
||||
|
@ -8,7 +8,7 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
|
||||
If you modify libpng you may insert additional notices immediately following
|
||||
this sentence.
|
||||
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.2.23, November 6, 2007, are
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.2.24, December 14, 2007, 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
|
||||
@ -106,4 +106,4 @@ certification mark of the Open Source Initiative.
|
||||
|
||||
Glenn Randers-Pehrson
|
||||
glennrp at users.sourceforge.net
|
||||
November 6, 2007
|
||||
December 14, 2007
|
||||
|
@ -1,6 +1,8 @@
|
||||
|
||||
Changes made to pristine png source by mozilla.org developers.
|
||||
|
||||
2007/12/14 -- Synced with libpng-1.2.24 (bug #408429).
|
||||
|
||||
2007/11/10 -- Synced with libpng-1.2.23; Removed pnggccrd.c and pngvcrd.c;
|
||||
Reduced footprint by removing error and warning text
|
||||
(bug #403239)
|
||||
|
@ -1,4 +1,4 @@
|
||||
README for libpng version 1.2.23 - November 6, 2007 (shared library 12.0)
|
||||
README for libpng version 1.2.24 - December 14, 2007 (shared library 12.0)
|
||||
See the note about version numbers near the top of png.h
|
||||
|
||||
See INSTALL for instructions on how to install libpng.
|
||||
@ -190,11 +190,11 @@ Files in this distribution:
|
||||
descrip.mms => VMS makefile for MMS or MMK
|
||||
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
||||
makefile.elf => Linux/ELF makefile symbol versioning,
|
||||
gcc, creates libpng12.so.0.1.2.23)
|
||||
gcc, creates libpng12.so.0.1.2.24)
|
||||
makefile.linux => Linux/ELF makefile
|
||||
(gcc, creates libpng12.so.0.1.2.23)
|
||||
(gcc, creates libpng12.so.0.1.2.24)
|
||||
makefile.gcmmx => Linux/ELF makefile
|
||||
(gcc, creates libpng12.so.0.1.2.23,
|
||||
(gcc, creates libpng12.so.0.1.2.24,
|
||||
uses assembler code tuned for Intel MMX platform)
|
||||
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
||||
makefile.knr => Archaic UNIX Makefile that converts files with
|
||||
@ -216,12 +216,12 @@ Files in this distribution:
|
||||
makefile.openbsd => OpenBSD makefile
|
||||
makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
|
||||
makefile.sggcc => Silicon Graphics
|
||||
(gcc, creates libpng12.so.0.1.2.23)
|
||||
(gcc, creates libpng12.so.0.1.2.24)
|
||||
makefile.sunos => Sun makefile
|
||||
makefile.solaris => Solaris 2.X makefile
|
||||
(gcc, creates libpng12.so.0.1.2.23)
|
||||
(gcc, creates libpng12.so.0.1.2.24)
|
||||
makefile.so9 => Solaris 9 makefile
|
||||
(gcc, creates libpng12.so.0.1.2.23)
|
||||
(gcc, creates libpng12.so.0.1.2.24)
|
||||
makefile.32sunu => Sun Ultra 32-bit makefile
|
||||
makefile.64sunu => Sun Ultra 64-bit makefile
|
||||
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
||||
|
@ -1,6 +1,6 @@
|
||||
libpng.txt - A description on how to use and modify libpng
|
||||
|
||||
libpng version 1.2.23 - November 6, 2007
|
||||
libpng version 1.2.24 - December 14, 2007
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<glennrp at users.sourceforge.net>
|
||||
Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
@ -2796,13 +2796,13 @@ application:
|
||||
|
||||
IX. Y2K Compliance in libpng
|
||||
|
||||
November 6, 2007
|
||||
December 14, 2007
|
||||
|
||||
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.2.23 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.2.24 are Y2K compliant. It is my belief that earlier
|
||||
versions were also Y2K compliant.
|
||||
|
||||
Libpng only has three year fields. One is a 2-byte unsigned integer that
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "png.h"
|
||||
|
||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||
typedef version_1_2_23 Your_png_h_is_not_version_1_2_23;
|
||||
typedef version_1_2_24 Your_png_h_is_not_version_1_2_24;
|
||||
|
||||
/* Version information for C files. This had better match the version
|
||||
* string defined in png.h. */
|
||||
@ -696,7 +696,7 @@ png_charp PNGAPI
|
||||
png_get_copyright(png_structp png_ptr)
|
||||
{
|
||||
png_ptr = png_ptr; /* silence compiler warning about unused png_ptr */
|
||||
return ((png_charp) "\n libpng version 1.2.23 - November 6, 2007\n\
|
||||
return ((png_charp) "\n libpng version 1.2.24 - December 14, 2007\n\
|
||||
Copyright (c) 1998-2007 Glenn Randers-Pehrson\n\
|
||||
Copyright (c) 1996-1997 Andreas Dilger\n\
|
||||
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\n");
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* png.h - header file for PNG reference library
|
||||
*
|
||||
* libpng version 1.2.23 - November 6, 2007
|
||||
* libpng version 1.2.24 - December 14, 2007
|
||||
* Copyright (c) 1998-2007 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.)
|
||||
@ -9,7 +9,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.2.23 - November 6, 2007: Glenn
|
||||
* libpng versions 0.97, January 1998, through 1.2.24 - December 14, 2007: Glenn
|
||||
* See also "Contributing Authors", below.
|
||||
*
|
||||
* Note about libpng version numbers:
|
||||
@ -172,6 +172,9 @@
|
||||
* 1.2.23beta01-05 13 10223 12.so.0.23[.0]
|
||||
* 1.2.23rc01 13 10223 12.so.0.23[.0]
|
||||
* 1.2.23 13 10223 12.so.0.23[.0]
|
||||
* 1.2.24beta01-02 13 10224 12.so.0.24[.0]
|
||||
* 1.2.24rc01 13 10224 12.so.0.24[.0]
|
||||
* 1.2.24 13 10224 12.so.0.24[.0]
|
||||
*
|
||||
* Henceforth the source version will match the shared-library major
|
||||
* and minor numbers; the shared-library major version number will be
|
||||
@ -201,7 +204,7 @@
|
||||
* If you modify libpng you may insert additional notices immediately following
|
||||
* this sentence.
|
||||
*
|
||||
* libpng versions 1.2.6, August 15, 2004, through 1.2.23, November 6, 2007, are
|
||||
* libpng versions 1.2.6, August 15, 2004, through 1.2.24, December 14, 2007, 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:
|
||||
@ -313,13 +316,13 @@
|
||||
* Y2K compliance in libpng:
|
||||
* =========================
|
||||
*
|
||||
* November 6, 2007
|
||||
* December 14, 2007
|
||||
*
|
||||
* 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.2.23 are Y2K compliant. It is my belief that earlier
|
||||
* upward through 1.2.24 are Y2K compliant. It is my belief that earlier
|
||||
* versions were also Y2K compliant.
|
||||
*
|
||||
* Libpng only has three year fields. One is a 2-byte unsigned integer
|
||||
@ -375,9 +378,9 @@
|
||||
*/
|
||||
|
||||
/* Version information for png.h - this should match the version in png.c */
|
||||
#define PNG_LIBPNG_VER_STRING "1.2.23"
|
||||
#define PNG_LIBPNG_VER_STRING "1.2.24"
|
||||
#define PNG_HEADER_VERSION_STRING \
|
||||
" libpng version 1.2.23 - November 6, 2007\n"
|
||||
" libpng version 1.2.24 - December 14, 2007\n"
|
||||
|
||||
#define PNG_LIBPNG_VER_SONUM 0
|
||||
#define PNG_LIBPNG_VER_DLLNUM 13
|
||||
@ -385,7 +388,7 @@
|
||||
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
|
||||
#define PNG_LIBPNG_VER_MAJOR 1
|
||||
#define PNG_LIBPNG_VER_MINOR 2
|
||||
#define PNG_LIBPNG_VER_RELEASE 23
|
||||
#define PNG_LIBPNG_VER_RELEASE 24
|
||||
/* This should match the numeric part of the final component of
|
||||
* PNG_LIBPNG_VER_STRING, omitting any leading zero: */
|
||||
|
||||
@ -413,7 +416,7 @@
|
||||
* Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only
|
||||
* 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 10223 /* 1.2.23 */
|
||||
#define PNG_LIBPNG_VER 10224 /* 1.2.24 */
|
||||
|
||||
#ifndef PNG_VERSION_INFO_ONLY
|
||||
/* include the compression library's header */
|
||||
@ -1203,10 +1206,12 @@ struct png_struct_def
|
||||
png_uint_32 row_number; /* current row in interlace pass */
|
||||
png_bytep prev_row; /* buffer to save previous (unfiltered) row */
|
||||
png_bytep row_buf; /* buffer to save current (unfiltered) row */
|
||||
#ifndef PNG_NO_WRITE_FILTERING
|
||||
png_bytep sub_row; /* buffer to save "sub" row when filtering */
|
||||
png_bytep up_row; /* buffer to save "up" row when filtering */
|
||||
png_bytep avg_row; /* buffer to save "avg" row when filtering */
|
||||
png_bytep paeth_row; /* buffer to save "Paeth" row when filtering */
|
||||
#endif
|
||||
png_row_info row_info; /* used for transformation routines */
|
||||
|
||||
png_uint_32 idat_size; /* current IDAT size for read */
|
||||
@ -1477,7 +1482,7 @@ struct png_struct_def
|
||||
/* This triggers a compiler error in png.c, if png.c and png.h
|
||||
* do not agree upon the version number.
|
||||
*/
|
||||
typedef png_structp version_1_2_23;
|
||||
typedef png_structp version_1_2_24;
|
||||
|
||||
typedef png_struct FAR * FAR * png_structpp;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngconf.h - machine configurable file for libpng
|
||||
*
|
||||
* libpng version 1.2.23 - November 6, 2007
|
||||
* libpng version 1.2.24 - December 14, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@ -325,7 +325,7 @@
|
||||
/* If you encounter a compiler error here, see the explanation
|
||||
* near the end of INSTALL.
|
||||
*/
|
||||
__png.h__ already includes setjmp.h;
|
||||
__pngconf.h__ already includes setjmp.h;
|
||||
__dont__ include it again.;
|
||||
# endif
|
||||
# endif /* __linux__ */
|
||||
@ -335,7 +335,9 @@
|
||||
|
||||
# ifdef __linux__
|
||||
# ifdef PNG_SAVE_BSD_SOURCE
|
||||
# define _BSD_SOURCE
|
||||
# ifndef _BSD_SOURCE
|
||||
# define _BSD_SOURCE
|
||||
# endif
|
||||
# undef PNG_SAVE_BSD_SOURCE
|
||||
# endif
|
||||
# endif /* __linux__ */
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngerror.c - stub functions for i/o and memory allocation
|
||||
*
|
||||
* Last changed in libpng 1.2.22 [November 6, 2007]
|
||||
* Last changed in libpng 1.2.22 [October 13, 2007]
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngpread.c - read a png file in push mode
|
||||
*
|
||||
* Last changed in libpng 1.2.22 [November 6, 2007]
|
||||
* Last changed in libpng 1.2.23 [November 6, 2007]
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngread.c - read a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.2.20 September 7, 2007
|
||||
* Last changed in libpng 1.2.24 December 14, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@ -1239,13 +1239,19 @@ png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr,
|
||||
png_structp png_ptr = NULL;
|
||||
png_infop info_ptr = NULL, end_info_ptr = NULL;
|
||||
#ifdef PNG_USER_MEM_SUPPORTED
|
||||
png_free_ptr free_fn;
|
||||
png_voidp mem_ptr;
|
||||
png_free_ptr free_fn = NULL;
|
||||
png_voidp mem_ptr = NULL;
|
||||
#endif
|
||||
|
||||
png_debug(1, "in png_destroy_read_struct\n");
|
||||
if (png_ptr_ptr != NULL)
|
||||
{
|
||||
png_ptr = *png_ptr_ptr;
|
||||
#ifdef PNG_USER_MEM_SUPPORTED
|
||||
free_fn = png_ptr->free_fn;
|
||||
mem_ptr = png_ptr->mem_ptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (info_ptr_ptr != NULL)
|
||||
info_ptr = *info_ptr_ptr;
|
||||
@ -1253,11 +1259,6 @@ png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr,
|
||||
if (end_info_ptr_ptr != NULL)
|
||||
end_info_ptr = *end_info_ptr_ptr;
|
||||
|
||||
#ifdef PNG_USER_MEM_SUPPORTED
|
||||
free_fn = png_ptr->free_fn;
|
||||
mem_ptr = png_ptr->mem_ptr;
|
||||
#endif
|
||||
|
||||
png_read_destroy(png_ptr, info_ptr, end_info_ptr);
|
||||
|
||||
if (info_ptr != NULL)
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngrtran.c - transforms the data in a row for PNG readers
|
||||
*
|
||||
* Last changed in libpng 1.2.22 [November 6, 2007]
|
||||
* Last changed in libpng 1.2.22 [October 13, 2007]
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngrutil.c - utilities to read a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.2.22 [November 6, 2007]
|
||||
* Last changed in libpng 1.2.23 [November 6, 2007]
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngset.c - storage of image information into info struct
|
||||
*
|
||||
* Last changed in libpng 1.2.22 [November 6, 2007]
|
||||
* Last changed in libpng 1.2.24 [December 14, 2007]
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@ -115,25 +115,14 @@ png_set_cHRM_fixed(png_structp png_ptr, png_infop info_ptr,
|
||||
"Ignoring attempt to set negative chromaticity value");
|
||||
return;
|
||||
}
|
||||
#ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||
if (white_x > (double) PNG_UINT_31_MAX ||
|
||||
white_y > (double) PNG_UINT_31_MAX ||
|
||||
red_x > (double) PNG_UINT_31_MAX ||
|
||||
red_y > (double) PNG_UINT_31_MAX ||
|
||||
green_x > (double) PNG_UINT_31_MAX ||
|
||||
green_y > (double) PNG_UINT_31_MAX ||
|
||||
blue_x > (double) PNG_UINT_31_MAX ||
|
||||
blue_y > (double) PNG_UINT_31_MAX)
|
||||
#else
|
||||
if (white_x > (png_fixed_point) PNG_UINT_31_MAX/100000L ||
|
||||
white_y > (png_fixed_point) PNG_UINT_31_MAX/100000L ||
|
||||
red_x > (png_fixed_point) PNG_UINT_31_MAX/100000L ||
|
||||
red_y > (png_fixed_point) PNG_UINT_31_MAX/100000L ||
|
||||
green_x > (png_fixed_point) PNG_UINT_31_MAX/100000L ||
|
||||
green_y > (png_fixed_point) PNG_UINT_31_MAX/100000L ||
|
||||
blue_x > (png_fixed_point) PNG_UINT_31_MAX/100000L ||
|
||||
blue_y > (png_fixed_point) PNG_UINT_31_MAX/100000L)
|
||||
#endif
|
||||
if (white_x > (png_fixed_point) PNG_UINT_31_MAX ||
|
||||
white_y > (png_fixed_point) PNG_UINT_31_MAX ||
|
||||
red_x > (png_fixed_point) PNG_UINT_31_MAX ||
|
||||
red_y > (png_fixed_point) PNG_UINT_31_MAX ||
|
||||
green_x > (png_fixed_point) PNG_UINT_31_MAX ||
|
||||
green_y > (png_fixed_point) PNG_UINT_31_MAX ||
|
||||
blue_x > (png_fixed_point) PNG_UINT_31_MAX ||
|
||||
blue_y > (png_fixed_point) PNG_UINT_31_MAX )
|
||||
{
|
||||
png_warning(png_ptr,
|
||||
"Ignoring attempt to set chromaticity value exceeding 21474.83");
|
||||
@ -1000,13 +989,9 @@ png_set_sPLT(png_structp png_ptr,
|
||||
png_warning(png_ptr,
|
||||
"Out of memory while processing sPLT chunk");
|
||||
}
|
||||
/* TODO: use png_malloc_warn */
|
||||
png_memcpy(to->name, from->name, length);
|
||||
to->entries = (png_sPLT_entryp)png_malloc_warn(png_ptr,
|
||||
from->nentries * png_sizeof(png_sPLT_entry));
|
||||
/* TODO: use png_malloc_warn */
|
||||
png_memcpy(to->entries, from->entries,
|
||||
from->nentries * png_sizeof(png_sPLT_entry));
|
||||
if (to->entries == NULL)
|
||||
{
|
||||
png_warning(png_ptr,
|
||||
@ -1014,6 +999,8 @@ png_set_sPLT(png_structp png_ptr,
|
||||
png_free(png_ptr,to->name);
|
||||
to->name = NULL;
|
||||
}
|
||||
png_memcpy(to->entries, from->entries,
|
||||
from->nentries * png_sizeof(png_sPLT_entry));
|
||||
to->nentries = from->nentries;
|
||||
to->depth = from->depth;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngwrite.c - general routines to write a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.2.15 January 5, 2007
|
||||
* Last changed in libpng 1.2.24 December 14, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@ -1068,11 +1068,13 @@ png_write_destroy(png_structp png_ptr)
|
||||
/* free our memory. png_free checks NULL for us. */
|
||||
png_free(png_ptr, png_ptr->zbuf);
|
||||
png_free(png_ptr, png_ptr->row_buf);
|
||||
#ifndef PNG_NO_WRITE_FILTERING
|
||||
png_free(png_ptr, png_ptr->prev_row);
|
||||
png_free(png_ptr, png_ptr->sub_row);
|
||||
png_free(png_ptr, png_ptr->up_row);
|
||||
png_free(png_ptr, png_ptr->avg_row);
|
||||
png_free(png_ptr, png_ptr->paeth_row);
|
||||
#endif
|
||||
|
||||
#if defined(PNG_TIME_RFC1123_SUPPORTED)
|
||||
png_free(png_ptr, png_ptr->time_buffer);
|
||||
|
Loading…
Reference in New Issue
Block a user