Imported from libpng-1.2.24beta01.tar

This commit is contained in:
Glenn Randers-Pehrson
2007-11-19 20:02:11 -06:00
parent 507a35a9be
commit 541b47ac2a
56 changed files with 198 additions and 1075 deletions

View File

@@ -1,7 +1,7 @@
/* pngset.c - storage of image information into info struct
*
* Last changed in libpng 1.2.22 [November 6, 2007]
* Last changed in libpng 1.2.24 [November 20, 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)
@@ -995,13 +995,9 @@ png_set_sPLT(png_structp png_ptr,
png_warning(png_ptr,
"Out of memory while processing sPLT chunk");
}
/* TODO: use png_malloc_warn */
png_memcpy(to->name, from->name, length);
to->entries = (png_sPLT_entryp)png_malloc_warn(png_ptr,
from->nentries * png_sizeof(png_sPLT_entry));
/* TODO: use png_malloc_warn */
png_memcpy(to->entries, from->entries,
from->nentries * png_sizeof(png_sPLT_entry));
if (to->entries == NULL)
{
png_warning(png_ptr,
@@ -1009,6 +1005,8 @@ png_set_sPLT(png_structp png_ptr,
png_free(png_ptr,to->name);
to->name = NULL;
}
png_memcpy(to->entries, from->entries,
from->nentries * png_sizeof(png_sPLT_entry));
to->nentries = from->nentries;
to->depth = from->depth;
}