diff --git a/pngrutil.c b/pngrutil.c index 38f0d5193..f5f3f8eac 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -257,6 +257,10 @@ png_crc_error(png_structrp png_ptr) return (0); } +#if defined(PNG_READ_iCCP_SUPPORTED) || defined(PNG_READ_iTXt_SUPPORTED) ||\ + defined(PNG_READ_pCAL_SUPPORTED) || defined(PNG_READ_sCAL_SUPPORTED) ||\ + defined(PNG_READ_sPLT_SUPPORTED) || defined(PNG_READ_tEXt_SUPPORTED) ||\ + defined(PNG_READ_zTXt_SUPPORTED) || defined(PNG_SEQUENTIAL_READ_SUPPORTED) /* Manage the read buffer; this simply reallocates the buffer if it is not small * enough (or if it is not allocated). The routine returns a pointer to the * buffer; if an error occurs and 'warn' is set the routine returns NULL, else @@ -304,6 +308,7 @@ png_read_buffer(png_structrp png_ptr, png_alloc_size_t new_size, int warn) return buffer; } +#endif /* PNG_READ_iCCP|iTXt|pCAL|sCAL|sPLT|tEXt|zTXt|SEQUENTIAL_READ */ /* png_inflate_claim: claim the zstream for some nefarious purpose that involves * decompression. Returns Z_OK on success, else a zlib error code. It checks diff --git a/scripts/pnglibconf.dfa b/scripts/pnglibconf.dfa index 21086b2cb..0f55f6608 100644 --- a/scripts/pnglibconf.dfa +++ b/scripts/pnglibconf.dfa @@ -864,7 +864,7 @@ option READ_CHECK_FOR_INVALID_INDEX requires READ disabled option WRITE_CHECK_FOR_INVALID_INDEX requires WRITE disabled # added at libpng-1.5.15 -option GET_PALETTE_MAX enables READ_GET_PALETTE_MAX, WRITE_GET_PALETTE_MAX +option GET_PALETTE_MAX enables READ_GET_PALETTE_MAX WRITE_GET_PALETTE_MAX option READ_GET_PALETTE_MAX requires READ_CHECK_FOR_INVALID_INDEX disabled option WRITE_GET_PALETTE_MAX requires WRITE_CHECK_FOR_INVALID_INDEX disabled @@ -893,6 +893,9 @@ option SIMPLIFIED_READ, option SIMPLIFIED_READ_AFIRST enables FORMAT_AFIRST, requires SIMPLIFIED_READ READ_SWAP_ALPHA +option SIMPLIFIED_READ_BGR enables FORMAT_BGR, + requires SIMPLIFIED_READ READ_BGR + # Write: option SIMPLIFIED_WRITE, requires WRITE STDIO, SETJMP, WRITE_SWAP, WRITE_PACK,