]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/1561
authorCristy <mikayla-grace@urban-warrior.org>
Mon, 29 Apr 2019 11:57:09 +0000 (07:57 -0400)
committerCristy <mikayla-grace@urban-warrior.org>
Mon, 29 Apr 2019 11:57:09 +0000 (07:57 -0400)
coders/png.c

index 84b95c234fc012a3cf6700a226c600e9597481d5..077cc845b15ed4c4b9fc990312829e17382eab13 100644 (file)
@@ -8180,8 +8180,11 @@ Magick_png_write_raw_profile(const ImageInfo *image_info,png_struct *ping,
    unsigned char
      hex[16]={'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'};
 
-   if (LocaleNCompare((char *) profile_type+1, "ng-chunk-",9) == 0)
-      return;
+   if (length > 1)
+     {
+       if (LocaleNCompare((char *) profile_type+1, "ng-chunk-",9) == 0)
+          return;
+     }
 
    if (image_info->verbose)
      {