pngcp minimal configuration changes

Corrections for the pngcp minimal configuration in libpng 1.7 and corrections to
the libpng 1.7 code to fix bugs revealed by the reduced configuration.

Signed-off-by: John Bowler <jbowler@acm.org>
This commit is contained in:
John Bowler
2016-07-01 22:39:13 -07:00
parent eaf7abfdc3
commit 6a574a84bd
8 changed files with 61 additions and 40 deletions

View File

@@ -777,11 +777,18 @@ png_handle_error(png_structrp png_ptr
png_chunk_benign_error(png_ptr, error);
}
#if defined (PNG_READ_gAMA_SUPPORTED) || defined (PNG_READ_sBIT_SUPPORTED) ||\
defined (PNG_READ_cHRM_SUPPORTED) || defined (PNG_READ_sRGB_SUPPORTED) ||\
defined (PNG_READ_iCCP_SUPPORTED) || defined (PNG_READ_tRNS_SUPPORTED) ||\
defined (PNG_READ_bKGD_SUPPORTED) || defined (PNG_READ_hIST_SUPPORTED) ||\
defined (PNG_READ_pHYs_SUPPORTED) || defined (PNG_READ_oFFs_SUPPORTED) ||\
defined (PNG_READ_sCAL_SUPPORTED) || defined (PNG_READ_tIME_SUPPORTED)
static void
png_handle_bad_length(png_structrp png_ptr)
{
png_handle_error(png_ptr, "invalid length");
}
#endif /* chunks that can generate length errors */
/* Read and check the IDHR chunk */
static void