LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File ImageMagick-6.2.8-png-overflow.patch of Package ImageMagick (Project home:netmax:distribution:CentOS_5)

--- ImageMagick/coders/png.c	(revision 4907)
+++ ImageMagick/coders/png.c	(revision 5102)
@@ -6004,7 +6004,7 @@ png_write_raw_profile(const ImageInfo *i
      allocated_length);
    dp+=description_length;
    *dp++='\n';
-   (void) FormatMagickString(dp,allocated_length-strlen(text[0].text),"%8lu ",length);
+   (void) FormatMagickString(dp,allocated_length-(png_size_t) (dp-text[0].text),"%8lu ",length);
    dp+=8;
    for (i=0; i < (long) length; i++)
    {