summaryrefslogtreecommitdiff
path: root/pngrutil.c
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2000-04-14 14:20:47 -0500
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2009-04-06 16:04:58 -0500
commit4accabb590d887f310cd7798f46640a4288da3fd (patch)
treef8ccdb215de772178448ed7c6517002b6814b321 /pngrutil.c
parent38e6e774192a73f40c2cf2a4fc23989b7c9259d6 (diff)
downloadlibpng-4accabb590d887f310cd7798f46640a4288da3fd.tar.gz
Imported from libpng-1.0.6f.tarv1.0.6f
Diffstat (limited to 'pngrutil.c')
-rw-r--r--pngrutil.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/pngrutil.c b/pngrutil.c
index 9d08d133c..fc89edeae 100644
--- a/pngrutil.c
+++ b/pngrutil.c
@@ -1,7 +1,7 @@
/* pngrutil.c - utilities to read a PNG file
*
- * libpng 1.0.6e - April 10, 2000
+ * libpng 1.0.6f - April 14, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
@@ -133,7 +133,7 @@ png_crc_error(png_structp png_ptr)
}
#if defined(PNG_READ_zTXt_SUPPORTED) || defined(PNG_READ_iTXt_SUPPORTED) || \
- defined(PNG_READ_iCCP_SUPPORTED) || defined(PNG_READ_sPLT_SUPPORTED)
+ defined(PNG_READ_iCCP_SUPPORTED)
/*
* Decompress trailing data in a chunk. The assumption is that chunkdata
* points at an allocated area holding the contents of a chunk with a
@@ -951,7 +951,8 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
if (profile >= chunkdata + slength)
{
png_free(png_ptr, chunkdata);
- png_error(png_ptr, "malformed iCCP chunk");
+ png_warning(png_ptr, "malformed iCCP chunk");
+ return;
}
/* compression should always be zero */
@@ -1019,7 +1020,8 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
if (entry_start > chunkdata + slength)
{
png_free(png_ptr, chunkdata);
- png_error(png_ptr, "malformed sPLT chunk");
+ png_warning(png_ptr, "malformed sPLT chunk");
+ return;
}
new_palette.depth = *entry_start++;
@@ -1563,7 +1565,10 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
#ifdef PNG_FLOATING_POINT_SUPPORTED
width = strtod(ep, &vp);
if (*vp)
- png_error(png_ptr, "malformed width string in sCAL chunk");
+ {
+ png_warning(png_ptr, "malformed width string in sCAL chunk");
+ return;
+ }
#else
#ifdef PNG_FIXED_POINT_SUPPORTED
swidth = (png_charp)png_malloc(png_ptr, strlen(ep) + 1);
@@ -1578,7 +1583,10 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
#ifdef PNG_FLOATING_POINT_SUPPORTED
height = strtod(ep, &vp);
if (*vp)
- png_error(png_ptr, "malformed height string in sCAL chunk");
+ {
+ png_warning(png_ptr, "malformed height string in sCAL chunk");
+ return;
+ }
#else
#ifdef PNG_FIXED_POINT_SUPPORTED
sheight = (png_charp)png_malloc(png_ptr, strlen(ep) + 1);