mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Added PNG_SECURE feature to pnglibconf.dfa and new pngusr.dfa file
to reset the user limits to safe ones if PNG_SECURE is defined.
This commit is contained in:
@@ -276,8 +276,8 @@ option SET_USER_LIMITS enables SET_CHUNK_MALLOC_LIMIT
|
||||
# Added at libpng-1.0.16 and 1.2.6. To accept all valid PNGs no matter
|
||||
# how large, set these two limits to 0x7fffffff
|
||||
|
||||
setting USER_WIDTH_MAX default 1000000
|
||||
setting USER_HEIGHT_MAX default 1000000
|
||||
setting USER_WIDTH_MAX default 0x7fffffff
|
||||
setting USER_HEIGHT_MAX default 0x7fffffff
|
||||
|
||||
# Added at libpng-1.2.43. To accept all valid PNGs no matter
|
||||
# how large, set these two limits to 0.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
/* pnglibconf.h - library build configuration */
|
||||
|
||||
/* Libpng 1.6.0beta13 - February 19, 2012 */
|
||||
/* Libpng 1.6.0beta13 - February 24, 2012 */
|
||||
|
||||
/* Copyright (c) 1998-2012 Glenn Randers-Pehrson */
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
#define PNG_sCAL_PRECISION 5
|
||||
#define PNG_USER_CHUNK_CACHE_MAX 0
|
||||
#define PNG_USER_CHUNK_MALLOC_MAX 0
|
||||
#define PNG_USER_HEIGHT_MAX 1000000
|
||||
#define PNG_USER_WIDTH_MAX 1000000
|
||||
#define PNG_USER_HEIGHT_MAX 0x7fffffff
|
||||
#define PNG_USER_WIDTH_MAX 0x7fffffff
|
||||
#define PNG_WEIGHT_SHIFT 8
|
||||
#define PNG_ZBUF_SIZE 8192
|
||||
/* end of settings */
|
||||
|
||||
@@ -42,13 +42,13 @@ pnglibconf.h: pnglibconf.dfn
|
||||
$(COPY) dfn3.out $@
|
||||
$(DELETE) dfn.c dfn1.out dfn2.out dfn3.out
|
||||
|
||||
pnglibconf.dfn: $(srcdir)/scripts/pnglibconf.dfa $(srcdir)/scripts/options.awk $(srcdir)/pngconf.h $(DFA_XTRA)
|
||||
pnglibconf.dfn: $(srcdir)/scripts/pnglibconf.dfa $(srcdir)/scripts/options.awk $(srcdir)/pngconf.h $(srcdir)/pngusr.dfa
|
||||
$(DELETE) $@ dfn1.out dfn2.out
|
||||
$(ECHO) "Calling $(AWK) from scripts/pnglibconf.mak" >&2
|
||||
$(ECHO) "If 'awk' crashes try a better awk (e.g. AWK='nawk')" >&2
|
||||
$(AWK) -f $(srcdir)/scripts/options.awk out=dfn1.out version=search\
|
||||
$(srcdir)/pngconf.h $(srcdir)/scripts/pnglibconf.dfa\
|
||||
$(DFA_XTRA) 1>&2
|
||||
$(srcdir)/pngusr.dfa $(DFA_XTRA) 1>&2
|
||||
$(AWK) -f $(srcdir)/scripts/options.awk out=dfn2.out dfn1.out 1>&2
|
||||
$(COPY) dfn2.out $@
|
||||
$(DELETE) dfn1.out dfn2.out
|
||||
|
||||
Reference in New Issue
Block a user