Imported from libpng-1.4.0beta23.tar

This commit is contained in:
Glenn Randers-Pehrson
2008-07-22 13:59:07 -05:00
parent d8d7b949d9
commit 72b633026b
59 changed files with 125 additions and 121 deletions

View File

@@ -1,7 +1,7 @@
/* pngrutil.c - utilities to read a PNG file
*
* Last changed in libpng 1.4.0 [July 21, 2008]
* Last changed in libpng 1.4.0 [July 22, 2008]
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2008 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -246,7 +246,7 @@ png_decompress_chunk(png_structp png_ptr, int comp_type,
if (text == NULL)
{
png_free(png_ptr, chunkdata);
chunkdata = NULL;
png_ptr->chunkdata = NULL;
png_error(png_ptr, "Not enough memory to decompress chunk");
}
png_memcpy(text, chunkdata, prefix_size);
@@ -271,7 +271,7 @@ png_decompress_chunk(png_structp png_ptr, int comp_type,
if (text == NULL)
{
png_free(png_ptr, chunkdata);
chunkdata = NULL;
png_ptr->chunkdata = NULL;
png_error(png_ptr,
"Not enough memory to decompress chunk");
}
@@ -292,7 +292,7 @@ png_decompress_chunk(png_structp png_ptr, int comp_type,
{
png_free(png_ptr, tmp);
png_free(png_ptr, chunkdata);
chunkdata = NULL;
png_ptr->chunkdata = NULL;
png_error(png_ptr,
"Not enough memory to decompress chunk");
}
@@ -341,7 +341,7 @@ png_decompress_chunk(png_structp png_ptr, int comp_type,
if (text == NULL)
{
png_free(png_ptr, chunkdata);
chunkdata = NULL;
png_ptr->chunkdata = NULL;
png_error(png_ptr, "Not enough memory for text");
}
png_memcpy(text, chunkdata, prefix_size);
@@ -1094,7 +1094,7 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
/* Check the profile_size recorded in the first 32 bits of the ICC profile */
pC = (png_bytep)(png_ptr->chunkdata + prefix_length);
profile_size = ((*(pC ))<<24) |
profile_size = ((*(pC ))<<24) |
((*(pC + 1))<<16) |
((*(pC + 2))<< 8) |
((*(pC + 3)) );