summaryrefslogtreecommitdiff
path: root/contrib/libtests/pngvalid.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libtests/pngvalid.c')
-rw-r--r--contrib/libtests/pngvalid.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/contrib/libtests/pngvalid.c b/contrib/libtests/pngvalid.c
index f5b11de6c..9063b69fe 100644
--- a/contrib/libtests/pngvalid.c
+++ b/contrib/libtests/pngvalid.c
@@ -1,8 +1,8 @@
/* pngvalid.c - validate libpng by constructing then reading png files.
*
- * Last changed in libpng 1.5.27 [(PENDING RELEASE)]
- * Copyright (c) 2014-2015 Glenn Randers-Pehrson
+ * Last changed in libpng 1.6.21 [(PENDING RELEASE)]
+ * Copyright (c) 2014-2016 Glenn Randers-Pehrson
* Written by John Cunningham Bowler
*
* This code is released under the libpng license.
@@ -309,8 +309,13 @@ static void r16(png_uint_16p p16, size_t count)
}
}
-#define R16(this)\
+#ifdef __COVERITY__
+# define R16(this)\
+ r16(&(this), (sizeof (this))/2U/*(sizeof (png_uint_16))*/)
+#else
+# define R16(this)\
r16(&(this), (sizeof (this))/(sizeof (png_uint_16)))
+#endif
#if defined PNG_READ_RGB_TO_GRAY_SUPPORTED ||\
defined PNG_READ_FILLER_SUPPORTED
@@ -326,8 +331,14 @@ static void r32(png_uint_32p p32, size_t count)
}
}
-#define R32(this)\
+#ifdef __COVERITY__
+# define R32(this)\
+ r32(&(this), (sizeof (this))/4U/*(sizeof (png_uint_32))*/)
+#else
+# define R32(this)\
r32(&(this), (sizeof (this))/(sizeof (png_uint_32)))
+#endif
+
#endif /* READ_FILLER || READ_RGB_TO_GRAY */
#endif /* READ || WRITE_tRNS || WRITE_FILTER */
@@ -6370,6 +6381,8 @@ transform_range_check(png_const_structp pp, unsigned int r, unsigned int g,
png_error(pp, message);
}
+
+ UNUSED(limit)
}
static void