mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[master] Removed some newly-added TAB characters from pngpread.c
and pngrtran.c, and fixed some indentation in pngpread.c and pngrutil.c
This commit is contained in:
parent
2302a4d04f
commit
d6a0cbaade
44
ANNOUNCE
44
ANNOUNCE
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Libpng 1.4.4beta01 - June 27, 2010
|
Libpng 1.4.4beta01 - July 1, 2010
|
||||||
|
|
||||||
This is not intended to be a public release. It will be replaced
|
This is not intended to be a public release. It will be replaced
|
||||||
within a few weeks by a public version or by another test version.
|
within a few weeks by a public version or by another test version.
|
||||||
@ -24,47 +24,13 @@ Other information:
|
|||||||
1.4.4beta01-README.txt
|
1.4.4beta01-README.txt
|
||||||
1.4.4beta01-LICENSE.txt
|
1.4.4beta01-LICENSE.txt
|
||||||
|
|
||||||
Changes since the last public release (1.4.2):
|
Changes since the last public release (1.4.3):
|
||||||
|
|
||||||
version 1.4.3beta01 [June 18, 2010]
|
version 1.4.4beta01 [July 1, 2010]
|
||||||
Added missing quotation marks in the aix block of configure.ac
|
|
||||||
The new "vstudio" project was missing from the zip and 7z distributions.
|
|
||||||
In pngpread.c: png_push_have_row() add check for new_row > height
|
|
||||||
|
|
||||||
version 1.4.3beta02 [June 18, 2010]
|
|
||||||
Removed the now-redundant check for out-of-bounds new_row from example.c
|
|
||||||
|
|
||||||
version 1.4.3beta03 [June 18, 2010]
|
|
||||||
In pngpread.c: png_push_finish_row() add check for too many rows.
|
|
||||||
|
|
||||||
version 1.4.3beta04 [June 19, 2010]
|
|
||||||
In pngpread.c: png_push_process_row() add check for too many rows.
|
|
||||||
Removed the checks added in beta01 and beta03, as they are now redundant.
|
|
||||||
|
|
||||||
version 1.4.3beta05 [June 20, 2010]
|
|
||||||
Rewrote png_process_IDAT_data to consistently treat extra data as warnings
|
|
||||||
and handle end conditions more cleanly.
|
|
||||||
Removed the new (beta04) check in png_push_process_row().
|
|
||||||
|
|
||||||
version 1.4.3rc01 [June 21, 2010]
|
|
||||||
Revised some comments in png_process_IDAT_data().
|
|
||||||
|
|
||||||
version 1.4.3rc03 [June 22, 2010]
|
|
||||||
Revised pngpread.c patch of beta05 to avoid an endless loop.
|
|
||||||
|
|
||||||
Changed char *msg to PNG_CONST char *msg in pngrutil.c
|
|
||||||
Stop memory leak when reading a malformed sCAL chunk.
|
|
||||||
Removed some trailing blanks.
|
|
||||||
|
|
||||||
version 1.4.3rc03 [June 23, 2010]
|
|
||||||
Revised pngpread.c patch of beta05 to avoid an endless loop.
|
|
||||||
|
|
||||||
version 1.4.3 [June 26, 2010]
|
|
||||||
Updated some of the "last changed" dates.
|
|
||||||
|
|
||||||
version 1.4.4beta01 [June 27, 2010]
|
|
||||||
Removed extraneous new_push_process_row.c file.
|
Removed extraneous new_push_process_row.c file.
|
||||||
Revised the "SEE ALSO" style of libpng.3, libpngpf.3, and png.5
|
Revised the "SEE ALSO" style of libpng.3, libpngpf.3, and png.5
|
||||||
|
Removed some newly-added TAB characters from pngpread.c.
|
||||||
|
Fixed some indentation in pngpread.c and pngrutil.c
|
||||||
|
|
||||||
Send comments/corrections/commendations to glennrp at users.sourceforge.net
|
Send comments/corrections/commendations to glennrp at users.sourceforge.net
|
||||||
or to png-mng-implement at lists.sf.net (subscription required; visit
|
or to png-mng-implement at lists.sf.net (subscription required; visit
|
||||||
|
4
CHANGES
4
CHANGES
@ -2610,9 +2610,11 @@ version 1.4.3rc03 [June 23, 2010]
|
|||||||
version 1.4.3 [June 26, 2010]
|
version 1.4.3 [June 26, 2010]
|
||||||
Updated some of the "last changed" dates.
|
Updated some of the "last changed" dates.
|
||||||
|
|
||||||
version 1.4.4beta01 [June 27, 2010]
|
version 1.4.4beta01 [July 1, 2010]
|
||||||
Removed extraneous new_push_process_row.c file.
|
Removed extraneous new_push_process_row.c file.
|
||||||
Revised the "SEE ALSO" style of libpng.3, libpngpf.3, and png.5
|
Revised the "SEE ALSO" style of libpng.3, libpngpf.3, and png.5
|
||||||
|
Removed some newly-added TAB characters from pngpread.c.
|
||||||
|
Fixed some indentation in pngpread.c and pngrutil.c
|
||||||
|
|
||||||
Send comments/corrections/commendations to glennrp at users.sourceforge.net
|
Send comments/corrections/commendations to glennrp at users.sourceforge.net
|
||||||
or to png-mng-implement at lists.sf.net (subscription required; visit
|
or to png-mng-implement at lists.sf.net (subscription required; visit
|
||||||
|
62
pngpread.c
62
pngpread.c
@ -843,7 +843,7 @@ png_process_IDAT_data(png_structp png_ptr, png_bytep buffer,
|
|||||||
* or the stream marked as finished.
|
* or the stream marked as finished.
|
||||||
*/
|
*/
|
||||||
while (png_ptr->zstream.avail_in > 0 &&
|
while (png_ptr->zstream.avail_in > 0 &&
|
||||||
!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED))
|
!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED))
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -872,49 +872,49 @@ png_process_IDAT_data(png_structp png_ptr, png_bytep buffer,
|
|||||||
/* Check for any failure before proceeding. */
|
/* Check for any failure before proceeding. */
|
||||||
if (ret != Z_OK && ret != Z_STREAM_END)
|
if (ret != Z_OK && ret != Z_STREAM_END)
|
||||||
{
|
{
|
||||||
/* Terminate the decompression. */
|
/* Terminate the decompression. */
|
||||||
png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
|
png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
|
||||||
|
|
||||||
/* This may be a truncated stream (missing or
|
/* This may be a truncated stream (missing or
|
||||||
* damaged end code). Treat that as a warning.
|
* damaged end code). Treat that as a warning.
|
||||||
*/
|
*/
|
||||||
if (png_ptr->row_number >= png_ptr->num_rows ||
|
if (png_ptr->row_number >= png_ptr->num_rows ||
|
||||||
png_ptr->pass > 6)
|
png_ptr->pass > 6)
|
||||||
png_warning(png_ptr, "Truncated compressed data in IDAT");
|
png_warning(png_ptr, "Truncated compressed data in IDAT");
|
||||||
else
|
else
|
||||||
png_error(png_ptr, "Decompression error in IDAT");
|
png_error(png_ptr, "Decompression error in IDAT");
|
||||||
|
|
||||||
/* Skip the check on unprocessed input */
|
/* Skip the check on unprocessed input */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Did inflate output any data? */
|
/* Did inflate output any data? */
|
||||||
if (png_ptr->zstream.next_out != png_ptr->row_buf)
|
if (png_ptr->zstream.next_out != png_ptr->row_buf)
|
||||||
{
|
{
|
||||||
/* Is this unexpected data after the last row?
|
/* Is this unexpected data after the last row?
|
||||||
* If it is, artificially terminate the LZ output
|
* If it is, artificially terminate the LZ output
|
||||||
* here.
|
* here.
|
||||||
*/
|
*/
|
||||||
if (png_ptr->row_number >= png_ptr->num_rows ||
|
if (png_ptr->row_number >= png_ptr->num_rows ||
|
||||||
png_ptr->pass > 6)
|
png_ptr->pass > 6)
|
||||||
{
|
{
|
||||||
/* Extra data. */
|
/* Extra data. */
|
||||||
png_warning(png_ptr, "Extra compressed data in IDAT");
|
png_warning(png_ptr, "Extra compressed data in IDAT");
|
||||||
png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
|
png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
|
||||||
/* Do no more processing; skip the unprocessed
|
/* Do no more processing; skip the unprocessed
|
||||||
* input check below.
|
* input check below.
|
||||||
*/
|
*/
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Do we have a complete row? */
|
/* Do we have a complete row? */
|
||||||
if (png_ptr->zstream.avail_out == 0)
|
if (png_ptr->zstream.avail_out == 0)
|
||||||
png_push_process_row(png_ptr);
|
png_push_process_row(png_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* And check for the end of the stream. */
|
/* And check for the end of the stream. */
|
||||||
if (ret == Z_STREAM_END)
|
if (ret == Z_STREAM_END)
|
||||||
png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
|
png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* All the data should have been processed, if anything
|
/* All the data should have been processed, if anything
|
||||||
@ -988,7 +988,7 @@ png_push_process_row(png_structp png_ptr)
|
|||||||
|
|
||||||
if (png_ptr->pass == 6 && png_ptr->height <= 4)
|
if (png_ptr->pass == 6 && png_ptr->height <= 4)
|
||||||
{
|
{
|
||||||
png_push_have_row(png_ptr, NULL);
|
png_push_have_row(png_ptr, NULL);
|
||||||
png_read_push_finish_row(png_ptr);
|
png_read_push_finish_row(png_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1028,7 +1028,7 @@ png_push_process_row(png_structp png_ptr)
|
|||||||
|
|
||||||
for (i = 0; i < 4 && png_ptr->pass == 2; i++)
|
for (i = 0; i < 4 && png_ptr->pass == 2; i++)
|
||||||
{
|
{
|
||||||
png_push_have_row(png_ptr, NULL);
|
png_push_have_row(png_ptr, NULL);
|
||||||
png_read_push_finish_row(png_ptr);
|
png_read_push_finish_row(png_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1078,13 +1078,13 @@ png_push_process_row(png_structp png_ptr)
|
|||||||
|
|
||||||
for (i = 0; i < 2 && png_ptr->pass == 4; i++)
|
for (i = 0; i < 2 && png_ptr->pass == 4; i++)
|
||||||
{
|
{
|
||||||
png_push_have_row(png_ptr, NULL);
|
png_push_have_row(png_ptr, NULL);
|
||||||
png_read_push_finish_row(png_ptr);
|
png_read_push_finish_row(png_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (png_ptr->pass == 6) /* Pass 5 might be empty */
|
if (png_ptr->pass == 6) /* Pass 5 might be empty */
|
||||||
{
|
{
|
||||||
png_push_have_row(png_ptr, NULL);
|
png_push_have_row(png_ptr, NULL);
|
||||||
png_read_push_finish_row(png_ptr);
|
png_read_push_finish_row(png_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1103,7 +1103,7 @@ png_push_process_row(png_structp png_ptr)
|
|||||||
|
|
||||||
if (png_ptr->pass == 6) /* Skip top generated row */
|
if (png_ptr->pass == 6) /* Skip top generated row */
|
||||||
{
|
{
|
||||||
png_push_have_row(png_ptr, NULL);
|
png_push_have_row(png_ptr, NULL);
|
||||||
png_read_push_finish_row(png_ptr);
|
png_read_push_finish_row(png_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1117,7 +1117,7 @@ png_push_process_row(png_structp png_ptr)
|
|||||||
if (png_ptr->pass != 6)
|
if (png_ptr->pass != 6)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
png_push_have_row(png_ptr, NULL);
|
png_push_have_row(png_ptr, NULL);
|
||||||
png_read_push_finish_row(png_ptr);
|
png_read_push_finish_row(png_ptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
18
pngrutil.c
18
pngrutil.c
@ -1128,20 +1128,20 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
|||||||
|
|
||||||
if (profile_size > profile_length)
|
if (profile_size > profile_length)
|
||||||
{
|
{
|
||||||
|
#ifdef PNG_STDIO_SUPPORTED
|
||||||
|
char umsg[50];
|
||||||
|
#endif
|
||||||
png_free(png_ptr, png_ptr->chunkdata);
|
png_free(png_ptr, png_ptr->chunkdata);
|
||||||
png_ptr->chunkdata = NULL;
|
png_ptr->chunkdata = NULL;
|
||||||
png_warning(png_ptr, "Ignoring truncated iCCP profile");
|
png_warning(png_ptr, "Ignoring truncated iCCP profile");
|
||||||
#ifdef PNG_STDIO_SUPPORTED
|
#ifdef PNG_STDIO_SUPPORTED
|
||||||
{
|
|
||||||
char umsg[50];
|
|
||||||
|
|
||||||
png_snprintf(umsg, 50, "declared profile size = %lu",
|
png_snprintf(umsg, 50, "declared profile size = %lu",
|
||||||
(unsigned long)profile_size);
|
(unsigned long)profile_size);
|
||||||
png_warning(png_ptr, umsg);
|
png_warning(png_ptr, umsg);
|
||||||
png_snprintf(umsg, 50, "actual profile length = %lu",
|
png_snprintf(umsg, 50, "actual profile length = %lu",
|
||||||
(unsigned long)profile_length);
|
(unsigned long)profile_length);
|
||||||
png_warning(png_ptr, umsg);
|
png_warning(png_ptr, umsg);
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -673,5 +673,5 @@ png_get_user_transform_ptr(png_structp png_ptr)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif /* PNG_READ_USER_TRANSFORM_SUPPORTED ||
|
#endif /* PNG_READ_USER_TRANSFORM_SUPPORTED ||
|
||||||
PNG_WRITE_USER_TRANSFORM_SUPPORTED */
|
PNG_WRITE_USER_TRANSFORM_SUPPORTED */
|
||||||
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
|
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user