From 07e656c7089f3b3ae30a71a042fb903c83e077b6 Mon Sep 17 00:00:00 2001 From: Cristy Date: Mon, 5 Feb 2018 19:52:34 -0500 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6032 --- coders/hdr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coders/hdr.c b/coders/hdr.c index 3ed74ad9f..1feb1a6b0 100644 --- a/coders/hdr.c +++ b/coders/hdr.c @@ -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); -- 2.40.0