Search
j0ke.net Open Build Service
>
Projects
>
graphics
:
ImageMagick:6.7.6.9
>
ImageMagick
> ImageMagick-6.7.6.9-CVE-2012-3437.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File ImageMagick-6.7.6.9-CVE-2012-3437.patch of Package ImageMagick
http://trac.imagemagick.org/changeset/8733/ImageMagick/trunk/coders/png.c Index: coders/png.c =================================================================== --- coders/png.c (revision 8726) +++ coders/png.c (revision 8733) @@ -1809,5 +1809,9 @@ #ifdef PNG_USER_MEM_SUPPORTED -static png_voidp Magick_png_malloc(png_structp png_ptr,png_uint_32 size) +#if PNG_LIBPNG_VER >= 14000 +static png_voidp Magick_png_malloc(png_structp png_ptr,png_alloc_size_t size) +#else +static png_voidp Magick_png_malloc(png_structp png_ptr,png_size_t size) +#endif { (void) png_ptr; @@ -7459,10 +7463,20 @@ } - text=(png_textp) png_malloc(ping,(png_uint_32) sizeof(png_text)); +#if PNG_LIBPNG_VER >= 14000 + text=(png_textp) png_malloc(ping,(png_alloc_size_t) sizeof(png_text)); +#else + text=(png_textp) png_malloc(ping,(png_size_t) sizeof(png_text)); +#endif description_length=(png_uint_32) strlen((const char *) profile_description); allocated_length=(png_uint_32) (length*2 + (length >> 5) + 20 + description_length); - text[0].text=(png_charp) png_malloc(ping,allocated_length); - text[0].key=(png_charp) png_malloc(ping, (png_uint_32) 80); +#if PNG_LIBPNG_VER >= 14000 + text[0].text=(png_charp) png_malloc(ping, + (png_alloc_size_t) allocated_length); + text[0].key=(png_charp) png_malloc(ping, (png_alloc_size_t) 80); +#else + text[0].text=(png_charp) png_malloc(ping, (png_size_t) allocated_length); + text[0].key=(png_charp) png_malloc(ping, (png_size_t) 80); +#endif text[0].key[0]='\0'; (void) ConcatenateMagickString(text[0].key, @@ -10783,5 +10797,11 @@ if (value != (const char *) NULL) { - text=(png_textp) png_malloc(ping,(png_uint_32) sizeof(png_text)); + +#if PNG_LIBPNG_VER >= 14000 + text=(png_textp) png_malloc(ping, + (png_alloc_size_t) sizeof(png_text)); +#else + text=(png_textp) png_malloc(ping,(png_size_t) sizeof(png_text)); +#endif text[0].key=(char *) property; text[0].text=(char *) value;