diff options
Diffstat (limited to 'plugins/AdvaImg/src/LibPNG/pngtest.c')
-rw-r--r-- | plugins/AdvaImg/src/LibPNG/pngtest.c | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/plugins/AdvaImg/src/LibPNG/pngtest.c b/plugins/AdvaImg/src/LibPNG/pngtest.c index dbf51a816d..980b904bfb 100644 --- a/plugins/AdvaImg/src/LibPNG/pngtest.c +++ b/plugins/AdvaImg/src/LibPNG/pngtest.c @@ -1,8 +1,8 @@ /* pngtest.c - a simple test program to test libpng
*
- * Last changed in libpng 1.6.15 [November 20, 2014]
- * Copyright (c) 1998-2014 Glenn Randers-Pehrson
+ * Last changed in libpng 1.6.17 [March 26, 2015]
+ * Copyright (c) 1998-2015 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.)
*
@@ -469,7 +469,7 @@ pngtest_error(png_structp png_ptr, png_const_charp message) #if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG
/* Allocate memory. For reasonable files, size should never exceed
- * 64K. However, zlib may allocate more then 64K if you don't tell
+ * 64K. However, zlib may allocate more than 64K if you don't tell
* it not to. See zconf.h and png.h for more information. zlib does
* need to allocate exactly 64K, so whatever you call here must
* have the ability to do that.
@@ -1701,6 +1701,8 @@ main(int argc, char *argv[]) int multiple = 0;
int ierror = 0;
+ png_structp dummy_ptr;
+
fprintf(STDERR, "\n Testing libpng version %s\n", PNG_LIBPNG_VER_STRING);
fprintf(STDERR, " with zlib version %s\n", ZLIB_VERSION);
fprintf(STDERR, "%s", png_get_copyright(NULL));
@@ -1994,6 +1996,24 @@ main(int argc, char *argv[]) else
fprintf(STDERR, " libpng FAILS test\n");
+ dummy_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
+ fprintf(STDERR, " Default limits:\n");
+ fprintf(STDERR, " width_max = %lu\n",
+ (unsigned long) png_get_user_width_max(dummy_ptr));
+ fprintf(STDERR, " height_max = %lu\n",
+ (unsigned long) png_get_user_height_max(dummy_ptr));
+ if (png_get_chunk_cache_max(dummy_ptr) == 0)
+ fprintf(STDERR, " cache_max = unlimited\n");
+ else
+ fprintf(STDERR, " cache_max = %lu\n",
+ (unsigned long) png_get_chunk_cache_max(dummy_ptr));
+ if (png_get_chunk_malloc_max(dummy_ptr) == 0)
+ fprintf(STDERR, " malloc_max = unlimited\n");
+ else
+ fprintf(STDERR, " malloc_max = %lu\n",
+ (unsigned long) png_get_chunk_malloc_max(dummy_ptr));
+ png_destroy_read_struct(&dummy_ptr, NULL, NULL);
+
return (int)(ierror != 0);
}
#else
@@ -2008,4 +2028,4 @@ main(void) #endif
/* Generate a compiler error if there is an old png.h in the search path. */
-typedef png_libpng_version_1_6_16 Your_png_h_is_not_version_1_6_16;
+typedef png_libpng_version_1_6_17 Your_png_h_is_not_version_1_6_17;
|