From e9446f2f9510418e08bb1a77e78bfaa487ef860c Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Sat, 23 Nov 2013 12:14:02 -0600 Subject: [PATCH] [libpng17] Added an "assert()" to pngfix.c to quiet a clang scanner warning. --- contrib/tools/pngfix.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/tools/pngfix.c b/contrib/tools/pngfix.c index 50576e607..3c70b81ad 100644 --- a/contrib/tools/pngfix.c +++ b/contrib/tools/pngfix.c @@ -2,7 +2,7 @@ * * Copyright (c) 2013 John Cunningham Bowler * - * Last changed in libpng 1.7.0 [(PENDING RELEASE)] + * Last changed in libpng 1.6.8 [(PENDING RELEASE)] * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer @@ -3336,6 +3336,8 @@ read_callback(png_structp png_ptr, png_bytep buffer, size_t count) /* FALL THROUGH */ default: + assert(chunk != NULL); + /* NOTE: the arithmetic below overflows and gives a large positive * png_uint_32 value until the whole chunk data has been written. */