[libpng17] Added an "assert()" to pngfix.c to quiet a clang scanner warning.

This commit is contained in:
Glenn Randers-Pehrson 2013-11-23 12:14:02 -06:00
parent f70f2fcf48
commit e9446f2f95

View File

@ -2,7 +2,7 @@
* *
* Copyright (c) 2013 John Cunningham Bowler * 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. * This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer * 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 */ /* FALL THROUGH */
default: default:
assert(chunk != NULL);
/* NOTE: the arithmetic below overflows and gives a large positive /* NOTE: the arithmetic below overflows and gives a large positive
* png_uint_32 value until the whole chunk data has been written. * png_uint_32 value until the whole chunk data has been written.
*/ */