[libpng17] Merge recent changes from libpng-1.6.14beta06:

Added "option READ_iCCP enables READ_COMPRESSED_TEXT" to pnglibconf.dfa
Removed unused "text_len" parameter from private function png_write_zTXt().
Conditionally compile some code in png_deflate_claim(), when
  PNG_WARNINGS_SUPPORTED and PNG_ERROR_TEXT_SUPPORTED are disabled.
Replaced repeated code in pngpread.c with PNG_PUSH_SAVE_BUFFER_IF_FULL.
Added "chunk iTXt enables TEXT" and "chunk zTXt enables TEXT"
  to pnglibconf.dfa.
Edit and fix typos in comments.
This commit is contained in:
Glenn Randers-Pehrson
2014-10-04 12:41:26 -05:00
parent b2e89f1af6
commit c7e743d385
10 changed files with 87 additions and 193 deletions

View File

@@ -727,7 +727,7 @@ png_set_text_2(png_structrp png_ptr, png_inforp info_ptr,
else
max_text = INT_MAX;
/* Now allocate a new array and copy the old members in, this does all
/* Now allocate a new array and copy the old members in; this does all
* the overflow checks.
*/
new_text = png_voidcast(png_textp,png_realloc_array(png_ptr,
@@ -1061,8 +1061,8 @@ png_set_sPLT(png_structrp png_ptr,
np->depth = entries->depth;
/* In the even of out-of-memory just return - there's no point keeping on
* trying to add sPLT chunks.
/* In the event of out-of-memory just return - there's no point keeping
* on trying to add sPLT chunks.
*/
length = strlen(entries->name) + 1;
np->name = png_voidcast(png_charp, png_malloc_base(png_ptr, length));
@@ -1073,8 +1073,8 @@ png_set_sPLT(png_structrp png_ptr,
memcpy(np->name, entries->name, length);
/* IMPORTANT: we have memory now that won't get freed if something else
* goes wrong, this code must free it. png_malloc_array produces no
* warnings, use a png_chunk_report (below) if there is an error.
* goes wrong; this code must free it. png_malloc_array produces no
* warnings; use a png_chunk_report (below) if there is an error.
*/
np->entries = png_voidcast(png_sPLT_entryp, png_malloc_array(png_ptr,
entries->nentries, sizeof (png_sPLT_entry)));
@@ -1113,7 +1113,7 @@ check_location(png_const_structrp png_ptr, int location)
location &= (PNG_HAVE_IHDR|PNG_HAVE_PLTE|PNG_AFTER_IDAT);
/* New in 1.6.0; copy the location and check it. This is an API
* change, previously the app had to use the
* change; previously the app had to use the
* png_set_unknown_chunk_location API below for each chunk.
*/
if (location == 0 && !(png_ptr->mode & PNG_IS_READ_STRUCT))