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

Side by Side Diff: third_party/libpng/pngmem.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/pngerror.c ('k') | third_party/libpng/pngrtran.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 /* pngmem.c - stub functions for memory allocation 2 /* pngmem.c - stub functions for memory allocation
3 * 3 *
4 * Last changed in libpng 1.2.41 [February 25, 2010] 4 * Last changed in libpng 1.2.41 [February 25, 2010]
5 * Copyright (c) 1998-2010 Glenn Randers-Pehrson 5 * Copyright (c) 1998-2010 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
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 } 435 }
436 } 436 }
437 437
438 /* Allocate memory. For reasonable files, size should never exceed 438 /* Allocate memory. For reasonable files, size should never exceed
439 * 64K. However, zlib may allocate more then 64K if you don't tell 439 * 64K. However, zlib may allocate more then 64K if you don't tell
440 * it not to. See zconf.h and png.h for more information. zlib does 440 * it not to. See zconf.h and png.h for more information. zlib does
441 * need to allocate exactly 64K, so whatever you call here must 441 * need to allocate exactly 64K, so whatever you call here must
442 * have the ability to do that. 442 * have the ability to do that.
443 */ 443 */
444 444
445 png_voidp PNGAPI 445 png_voidp /* PRIVATE */
446 png_calloc(png_structp png_ptr, png_uint_32 size) 446 png_calloc(png_structp png_ptr, png_uint_32 size)
447 { 447 {
448 png_voidp ret; 448 png_voidp ret;
449 449
450 ret = (png_malloc(png_ptr, size)); 450 ret = (png_malloc(png_ptr, size));
451 if (ret != NULL) 451 if (ret != NULL)
452 png_memset(ret,0,(png_size_t)size); 452 png_memset(ret,0,(png_size_t)size);
453 return (ret); 453 return (ret);
454 } 454 }
455 455
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 */ 632 */
633 png_voidp PNGAPI 633 png_voidp PNGAPI
634 png_get_mem_ptr(png_structp png_ptr) 634 png_get_mem_ptr(png_structp png_ptr)
635 { 635 {
636 if (png_ptr == NULL) 636 if (png_ptr == NULL)
637 return (NULL); 637 return (NULL);
638 return ((png_voidp)png_ptr->mem_ptr); 638 return ((png_voidp)png_ptr->mem_ptr);
639 } 639 }
640 #endif /* PNG_USER_MEM_SUPPORTED */ 640 #endif /* PNG_USER_MEM_SUPPORTED */
641 #endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */ 641 #endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
OLDNEW
« no previous file with comments | « third_party/libpng/pngerror.c ('k') | third_party/libpng/pngrtran.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698