Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(568)

Side by Side Diff: third_party/libpng/pngrutil.c

Issue 7464050: libpng: update to 1.2.45 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/libpng/pngrtran.c ('k') | third_party/libpng/pngwrite.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* pngrutil.c - utilities to read a PNG file 2 /* pngrutil.c - utilities to read a PNG file
3 * 3 *
4 * Last changed in libpng 1.2.44 [June 26, 2010] 4 * Last changed in libpng 1.2.45 [July 7, 2011]
5 * Copyright (c) 1998-2010 Glenn Randers-Pehrson 5 * Copyright (c) 1998-2011 Glenn Randers-Pehrson
6 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) 6 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
7 * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) 7 * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
8 * 8 *
9 * This code is released under the libpng license. 9 * This code is released under the libpng license.
10 * For conditions of distribution and use, see the disclaimer 10 * For conditions of distribution and use, see the disclaimer
11 * and license in png.h 11 * and license in png.h
12 * 12 *
13 * This file contains routines that are only called from within 13 * This file contains routines that are only called from within
14 * libpng itself during the course of reading an image. 14 * libpng itself during the course of reading an image.
15 */ 15 */
(...skipping 1789 matching lines...) Expand 10 before | Expand all | Expand 10 after
1805 png_crc_finish(png_ptr, length); 1805 png_crc_finish(png_ptr, length);
1806 return; 1806 return;
1807 } 1807 }
1808 else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sCAL)) 1808 else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sCAL))
1809 { 1809 {
1810 png_warning(png_ptr, "Duplicate sCAL chunk"); 1810 png_warning(png_ptr, "Duplicate sCAL chunk");
1811 png_crc_finish(png_ptr, length); 1811 png_crc_finish(png_ptr, length);
1812 return; 1812 return;
1813 } 1813 }
1814 1814
1815 /* Need unit type, width, \0, height: minimum 4 bytes */
1816 else if (length < 4)
1817 {
1818 png_warning(png_ptr, "sCAL chunk too short");
1819 png_crc_finish(png_ptr, length);
1820 return;
1821 }
1822
1815 png_debug1(2, "Allocating and reading sCAL chunk data (%lu bytes)", 1823 png_debug1(2, "Allocating and reading sCAL chunk data (%lu bytes)",
1816 length + 1); 1824 length + 1);
1817 png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1); 1825 png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1);
1818 if (png_ptr->chunkdata == NULL) 1826 if (png_ptr->chunkdata == NULL)
1819 { 1827 {
1820 png_warning(png_ptr, "Out of memory while processing sCAL chunk"); 1828 png_warning(png_ptr, "Out of memory while processing sCAL chunk");
1821 png_crc_finish(png_ptr, length); 1829 png_crc_finish(png_ptr, length);
1822 return; 1830 return;
1823 } 1831 }
1824 slength = (png_size_t)length; 1832 slength = (png_size_t)length;
(...skipping 1548 matching lines...) Expand 10 before | Expand all | Expand 10 after
3373 png_debug1(3, "height = %lu,", png_ptr->height); 3381 png_debug1(3, "height = %lu,", png_ptr->height);
3374 png_debug1(3, "iwidth = %lu,", png_ptr->iwidth); 3382 png_debug1(3, "iwidth = %lu,", png_ptr->iwidth);
3375 png_debug1(3, "num_rows = %lu,", png_ptr->num_rows); 3383 png_debug1(3, "num_rows = %lu,", png_ptr->num_rows);
3376 png_debug1(3, "rowbytes = %lu,", png_ptr->rowbytes); 3384 png_debug1(3, "rowbytes = %lu,", png_ptr->rowbytes);
3377 png_debug1(3, "irowbytes = %lu", 3385 png_debug1(3, "irowbytes = %lu",
3378 PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->iwidth) + 1); 3386 PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->iwidth) + 1);
3379 3387
3380 png_ptr->flags |= PNG_FLAG_ROW_INIT; 3388 png_ptr->flags |= PNG_FLAG_ROW_INIT;
3381 } 3389 }
3382 #endif /* PNG_READ_SUPPORTED */ 3390 #endif /* PNG_READ_SUPPORTED */
OLDNEW
« no previous file with comments | « third_party/libpng/pngrtran.c ('k') | third_party/libpng/pngwrite.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698