diff options
author | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2012-02-19 22:58:50 -0600 |
---|---|---|
committer | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2012-02-19 22:58:50 -0600 |
commit | 0d95b3d8dc70d293fea79f79160c0d4581e94699 (patch) | |
tree | d83bbacb195e7b0d86a50d2124b263bf73bc56a0 | |
parent | 8beb593bc299ed6059527a719816485c672999ac (diff) | |
download | libpng-0d95b3d8dc70d293fea79f79160c0d4581e94699.tar.gz |
[libpng14] Removed two useless #ifdef directives from pngread.c and
one from pngrutil.c
-rw-r--r-- | ANNOUNCE | 1 | ||||
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | pngread.c | 12 | ||||
-rw-r--r-- | pngrutil.c | 6 |
4 files changed, 9 insertions, 11 deletions
@@ -27,6 +27,7 @@ Other information: Changes since the last public release (1.4.8): version 1.4.10beta01 [February 20, 2012] + Removed two useless #ifdef directives from pngread.c and one from pngrutil.c Send comments/corrections/commendations to glennrp at users.sourceforge.net or to png-mng-implement at lists.sf.net (subscription required; visit @@ -2840,6 +2840,7 @@ version 1.4.9 [February 18, 2012] No changes. version 1.4.10beta01 [February 20, 2012] + Removed two useless #ifdef directives from pngread.c and one from pngrutil.c Send comments/corrections/commendations to glennrp at users.sourceforge.net or to png-mng-implement at lists.sf.net (subscription required; visit @@ -1,8 +1,8 @@ /* pngread.c - read a PNG file * - * Last changed in libpng 1.4.6 [March 8, 2011] - * Copyright (c) 1998-2011 Glenn Randers-Pehrson + * Last changed in libpng 1.4.10 [February 20, 2012] + * Copyright (c) 1998-2012 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.) * @@ -70,14 +70,12 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, #ifdef PNG_USER_LIMITS_SUPPORTED png_ptr->user_width_max = PNG_USER_WIDTH_MAX; png_ptr->user_height_max = PNG_USER_HEIGHT_MAX; -# ifdef PNG_USER_CHUNK_CACHE_MAX + /* Added at libpng-1.2.43 and 1.4.0 */ png_ptr->user_chunk_cache_max = PNG_USER_CHUNK_CACHE_MAX; -# endif -# ifdef PNG_SET_USER_CHUNK_MALLOC_MAX - /* Added at libpng-1.2.43 and 1.4.1 */ + + /* Added at libpng-1.4.1 */ png_ptr->user_chunk_malloc_max = PNG_USER_CHUNK_MALLOC_MAX; -# endif #endif #ifdef PNG_SETJMP_SUPPORTED diff --git a/pngrutil.c b/pngrutil.c index 58a5588d0..0a8baf877 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -1,7 +1,7 @@ /* pngrutil.c - utilities to read a PNG file * - * Last changed in libpng 1.4.9 [February 18, 2012] + * Last changed in libpng 1.4.10 [February 20, 2012] * Copyright (c) 1998-2012 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.) @@ -379,14 +379,12 @@ png_decompress_chunk(png_structp png_ptr, int comp_type, */ if (prefix_size >= (~(png_size_t)0) - 1 || expanded_size >= (~(png_size_t)0) - 1 - prefix_size -#ifdef PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED +#ifdef PNG_USER_LIMITS_SUPPORTED || (png_ptr->user_chunk_malloc_max && (prefix_size + expanded_size >= png_ptr->user_chunk_malloc_max - 1)) #else -# ifdef PNG_USER_CHUNK_MALLOC_MAX || ((PNG_USER_CHUNK_MALLOC_MAX > 0) && prefix_size + expanded_size >= PNG_USER_CHUNK_MALLOC_MAX - 1) -# endif #endif ) png_warning(png_ptr, "Exceeded size limit while expanding chunk"); |