Changeset 8733 for ImageMagick/trunk/coders/png.c
- Timestamp:
- 07/27/12 20:33:10 (10 months ago)
- File:
-
- 1 edited
-
ImageMagick/trunk/coders/png.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ImageMagick/trunk/coders/png.c
r8726 r8733 1809 1809 1810 1810 #ifdef PNG_USER_MEM_SUPPORTED 1811 static png_voidp Magick_png_malloc(png_structp png_ptr,png_uint_32 size) 1811 #if PNG_LIBPNG_VER >= 14000 1812 static png_voidp Magick_png_malloc(png_structp png_ptr,png_alloc_size_t size) 1813 #else 1814 static png_voidp Magick_png_malloc(png_structp png_ptr,png_size_t size) 1815 #endif 1812 1816 { 1813 1817 (void) png_ptr; … … 7459 7463 } 7460 7464 7461 text=(png_textp) png_malloc(ping,(png_uint_32) sizeof(png_text)); 7465 #if PNG_LIBPNG_VER >= 14000 7466 text=(png_textp) png_malloc(ping,(png_alloc_size_t) sizeof(png_text)); 7467 #else 7468 text=(png_textp) png_malloc(ping,(png_size_t) sizeof(png_text)); 7469 #endif 7462 7470 description_length=(png_uint_32) strlen((const char *) profile_description); 7463 7471 allocated_length=(png_uint_32) (length*2 + (length >> 5) + 20 7464 7472 + description_length); 7465 text[0].text=(png_charp) png_malloc(ping,allocated_length); 7466 text[0].key=(png_charp) png_malloc(ping, (png_uint_32) 80); 7473 #if PNG_LIBPNG_VER >= 14000 7474 text[0].text=(png_charp) png_malloc(ping, 7475 (png_alloc_size_t) allocated_length); 7476 text[0].key=(png_charp) png_malloc(ping, (png_alloc_size_t) 80); 7477 #else 7478 text[0].text=(png_charp) png_malloc(ping, (png_size_t) allocated_length); 7479 text[0].key=(png_charp) png_malloc(ping, (png_size_t) 80); 7480 #endif 7467 7481 text[0].key[0]='\0'; 7468 7482 (void) ConcatenateMagickString(text[0].key, … … 10783 10797 if (value != (const char *) NULL) 10784 10798 { 10785 text=(png_textp) png_malloc(ping,(png_uint_32) sizeof(png_text)); 10799 10800 #if PNG_LIBPNG_VER >= 14000 10801 text=(png_textp) png_malloc(ping, 10802 (png_alloc_size_t) sizeof(png_text)); 10803 #else 10804 text=(png_textp) png_malloc(ping,(png_size_t) sizeof(png_text)); 10805 #endif 10786 10806 text[0].key=(char *) property; 10787 10807 text[0].text=(char *) value;
Note: See TracChangeset
for help on using the changeset viewer.
