Imported from libpng-1.2.22beta4.tar

This commit is contained in:
Glenn Randers-Pehrson
2007-10-07 06:03:41 -05:00
parent 40dd10dfb2
commit ce2a6d3739
52 changed files with 127 additions and 121 deletions

View File

@@ -1,7 +1,7 @@
/* pngset.c - storage of image information into info struct
*
* Last changed in libpng 1.2.21 [October 6, 2007]
* Last changed in libpng 1.2.22 [October 7, 2007]
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -691,7 +691,7 @@ png_set_iCCP(png_structp png_ptr, png_infop info_ptr,
return;
}
png_strncpy(new_iccp_name, name, png_strlen(name));
new_iccp_name[png_strlen(name)]=0;
new_iccp_name[png_strlen(name)] = '\0';
new_iccp_profile = (png_charp)png_malloc_warn(png_ptr, proflen);
if (new_iccp_profile == NULL)
{
@@ -982,7 +982,7 @@ png_set_sPLT(png_structp png_ptr,
}
/* TODO: use png_malloc_warn */
png_strncpy(to->name, from->name, png_strlen(from->name));
to->name[png_strlen(from->name)]=0;
to->name[png_strlen(from->name)] = '\0';
to->entries = (png_sPLT_entryp)png_malloc_warn(png_ptr,
from->nentries * png_sizeof(png_sPLT_entry));
/* TODO: use png_malloc_warn */
@@ -1040,7 +1040,7 @@ png_set_unknown_chunks(png_structp png_ptr,
png_unknown_chunkp from = unknowns + i;
png_strncpy((png_charp)to->name, (png_charp)from->name, 4);
to->name[4]=0;
to->name[4] = '\0';
to->data = (png_bytep)png_malloc_warn(png_ptr, from->size);
if (to->data == NULL)
{