[libpng16] Suppressed some warnings from the Borland C++ 5.5.1/5.82 compiler

(Bug report by Viktor Szaka'ts).
This commit is contained in:
Glenn Randers-Pehrson
2015-04-01 12:06:01 -05:00
parent 507a8cdc5e
commit c861dc8923
10 changed files with 31 additions and 21 deletions

View File

@@ -670,7 +670,6 @@ png_decompress_chunk(png_structrp png_ptr,
* success)
*/
png_free(png_ptr, text);
text = NULL;
/* This really is very benign, but it's still an error because
* the extra space may otherwise be used as a Trojan Horse.
@@ -1817,7 +1816,8 @@ png_handle_tRNS(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
return;
}
if (length > png_ptr->num_palette || length > PNG_MAX_PALETTE_LENGTH ||
if (length > png_ptr->num_palette ||
length > (unsigned int) PNG_MAX_PALETTE_LENGTH ||
length == 0)
{
png_crc_finish(png_ptr, length);
@@ -1980,7 +1980,7 @@ png_handle_hIST(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
num = length / 2 ;
if (num != png_ptr->num_palette || num > PNG_MAX_PALETTE_LENGTH)
if (num != png_ptr->num_palette || num > (unsigned int) PNG_MAX_PALETTE_LENGTH)
{
png_crc_finish(png_ptr, length);
png_chunk_benign_error(png_ptr, "invalid");