]> granicus.if.org Git - imagemagick/commitdiff
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6032
authorCristy <urban-warrior@imagemagick.org>
Tue, 6 Feb 2018 00:52:34 +0000 (19:52 -0500)
committerCristy <urban-warrior@imagemagick.org>
Tue, 6 Feb 2018 00:52:34 +0000 (19:52 -0500)
coders/hdr.c

index 3ed74ad9f5921405355bcca021a8d4bd4f2072fa..1feb1a6b083497ee74160a7c584b7dadeb15edce 100644 (file)
@@ -711,7 +711,8 @@ static MagickBooleanType WriteHDRImage(const ImageInfo *image_info,Image *image,
   if ((property != (const char *) NULL) &&
       (strchr(property,'\n') == (char *) NULL))
     {
-      count=FormatLocaleString(header,MagickPathExtent,"#%s\n",property);
+      count=FormatLocaleString(header,MagickPathExtent,"#%.*s\n",
+        MagickPathExtent-3,property);
       (void) WriteBlob(image,(size_t) count,(unsigned char *) header);
     }
   property=GetImageProperty(image,"hdr:exposure",exception);