[libpng15] Added PNG_SAFE_LIMITS feature to pnglibconf.dfa

and code in pngconf.h to reset the user limits to safe ones if
PNG_SAFE_LIMITS is defined.
This commit is contained in:
Glenn Randers-Pehrson
2012-02-23 17:43:33 -06:00
parent d57dc304c4
commit 8ae616fa97
5 changed files with 38 additions and 10 deletions

View File

@@ -1,7 +1,7 @@
/* pngconf.h - machine configurable file for libpng
*
* libpng version 1.5.10beta01 - February 19, 2012
* libpng version 1.5.10beta01 - February 23, 2012
*
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -22,6 +22,26 @@
#ifndef PNGCONF_H
#define PNGCONF_H
/* Feature added at libpng-1.5.10 */
#ifdef PNG_SAFE_LIMITS_SUPPORTED
# ifdef PNG_USER_WIDTH_MAX
# undef PNG_USER_WIDTH_MAX
# define PNG_USER_WIDTH_MAX 1000000L
# endif
# ifdef PNG_USER_HEIGHT_MAX
# undef PNG_USER_HEIGHT_MAX
# define PNG_USER_HEIGHT_MAX 1000000L
# endif
# ifdef PNG_USER_CHUNK_MALLOC_MAX
# undef PNG_USER_CHUNK_MALLOC_MAX
# define PNG_USER_CHUNK_MALLOC_MAX 4000000L
# endif
# ifdef PNG_USER_CHUNK_CACHE_MAX
# undef PNG_USER_CHUNK_CACHE_MAX
# define PNG_USER_CHUNK_CACHE_MAX 128
# endif
#endif
#ifndef PNG_BUILDING_SYMBOL_TABLE
/* PNG_NO_LIMITS_H may be used to turn off the use of the standard C
* definition file for machine specific limits, this may impact the