summaryrefslogtreecommitdiffstats
path: root/third_party/libpng/pngread.c
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-20 20:30:14 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-20 20:30:14 +0000
commit497fbb5a93a56a9a1a0e87cdd67ee957b5ecdb86 (patch)
treec01e17a9c1d47e147787468d19c342825df84100 /third_party/libpng/pngread.c
parent2778def9d0245d1629cf77a6c35cf2ff7d452c83 (diff)
downloadchromium_src-497fbb5a93a56a9a1a0e87cdd67ee957b5ecdb86.zip
chromium_src-497fbb5a93a56a9a1a0e87cdd67ee957b5ecdb86.tar.gz
chromium_src-497fbb5a93a56a9a1a0e87cdd67ee957b5ecdb86.tar.bz2
Update libpng to 1.2.35.
Review URL: http://codereview.chromium.org/27005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10118 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/libpng/pngread.c')
-rw-r--r--third_party/libpng/pngread.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/third_party/libpng/pngread.c b/third_party/libpng/pngread.c
index d7e424d..ace91ba 100644
--- a/third_party/libpng/pngread.c
+++ b/third_party/libpng/pngread.c
@@ -1,9 +1,9 @@
/* pngread.c - read a PNG file
*
- * Last changed in libpng 1.2.30 [August 15, 2008]
+ * Last changed in libpng 1.2.35 [February 14, 2009]
* For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2008 Glenn Randers-Pehrson
+ * Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -47,7 +47,7 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
int i;
- png_debug(1, "in png_create_read_struct\n");
+ png_debug(1, "in png_create_read_struct");
#ifdef PNG_USER_MEM_SUPPORTED
png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG,
(png_malloc_ptr)malloc_fn, (png_voidp)mem_ptr);
@@ -263,7 +263,7 @@ png_read_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver,
}
} while (png_libpng_ver[i++]);
- png_debug(1, "in png_read_init_3\n");
+ png_debug(1, "in png_read_init_3");
#ifdef PNG_SETJMP_SUPPORTED
/* save jump buffer and error functions */
@@ -327,7 +327,7 @@ void PNGAPI
png_read_info(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr == NULL || info_ptr == NULL) return;
- png_debug(1, "in png_read_info\n");
+ png_debug(1, "in png_read_info");
/* If we haven't checked all of the PNG signature bytes, do so now. */
if (png_ptr->sig_bytes < 8)
{
@@ -533,7 +533,7 @@ png_read_info(png_structp png_ptr, png_infop info_ptr)
void PNGAPI
png_read_update_info(png_structp png_ptr, png_infop info_ptr)
{
- png_debug(1, "in png_read_update_info\n");
+ png_debug(1, "in png_read_update_info");
if (png_ptr == NULL) return;
if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
png_read_start_row(png_ptr);
@@ -552,7 +552,7 @@ png_read_update_info(png_structp png_ptr, png_infop info_ptr)
void PNGAPI
png_start_read_image(png_structp png_ptr)
{
- png_debug(1, "in png_start_read_image\n");
+ png_debug(1, "in png_start_read_image");
if (png_ptr == NULL) return;
if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
png_read_start_row(png_ptr);
@@ -571,7 +571,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
#endif
int ret;
if (png_ptr == NULL) return;
- png_debug2(1, "in png_read_row (row %lu, pass %d)\n",
+ png_debug2(1, "in png_read_row (row %lu, pass %d)",
png_ptr->row_number, png_ptr->pass);
if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
png_read_start_row(png_ptr);
@@ -822,7 +822,7 @@ png_read_rows(png_structp png_ptr, png_bytepp row,
png_bytepp rp;
png_bytepp dp;
- png_debug(1, "in png_read_rows\n");
+ png_debug(1, "in png_read_rows");
if (png_ptr == NULL) return;
rp = row;
dp = display_row;
@@ -871,7 +871,7 @@ png_read_image(png_structp png_ptr, png_bytepp image)
int pass, j;
png_bytepp rp;
- png_debug(1, "in png_read_image\n");
+ png_debug(1, "in png_read_image");
if (png_ptr == NULL) return;
#ifdef PNG_READ_INTERLACING_SUPPORTED
@@ -907,7 +907,7 @@ png_read_image(png_structp png_ptr, png_bytepp image)
void PNGAPI
png_read_end(png_structp png_ptr, png_infop info_ptr)
{
- png_debug(1, "in png_read_end\n");
+ png_debug(1, "in png_read_end");
if (png_ptr == NULL) return;
png_crc_finish(png_ptr, 0); /* Finish off CRC from last IDAT chunk */
@@ -1087,7 +1087,7 @@ png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr,
png_voidp mem_ptr = NULL;
#endif
- png_debug(1, "in png_destroy_read_struct\n");
+ png_debug(1, "in png_destroy_read_struct");
if (png_ptr_ptr != NULL)
png_ptr = *png_ptr_ptr;
if (png_ptr == NULL)
@@ -1161,7 +1161,7 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr
png_free_ptr free_fn;
#endif
- png_debug(1, "in png_read_destroy\n");
+ png_debug(1, "in png_read_destroy");
if (info_ptr != NULL)
png_info_destroy(png_ptr, info_ptr);
@@ -1437,11 +1437,11 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
#ifdef PNG_FREE_ME_SUPPORTED
info_ptr->free_me |= PNG_FREE_ROWS;
#endif
+ png_memset(info_ptr->row_pointers, 0, info_ptr->height
+ * png_sizeof(png_bytep));
for (row = 0; row < (int)info_ptr->height; row++)
- {
info_ptr->row_pointers[row] = (png_bytep)png_malloc(png_ptr,
png_get_rowbytes(png_ptr, info_ptr));
- }
}
png_read_image(png_ptr, info_ptr->row_pointers);