]> granicus.if.org Git - imagemagick/commitdiff
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8234
authorCristy <urban-warrior@imagemagick.org>
Sat, 12 May 2018 00:56:37 +0000 (20:56 -0400)
committerCristy <urban-warrior@imagemagick.org>
Sat, 12 May 2018 00:56:37 +0000 (20:56 -0400)
MagickCore/property.c

index 419600dab2ece7d886e78fe9828626b207bf9cfd..09b532becc888ecf1b3078d4e22a9257445da24f 100644 (file)
@@ -1677,19 +1677,27 @@ static MagickBooleanType GetICCProperty(const Image *image,const char *property,
         char
           info[MagickPathExtent];
 
-        if (cmsGetProfileInfoASCII(icc_profile,cmsInfoDescription,"en","US",
-              info,MagickPathExtent) != 0)
+        int
+          status;
+
+        (void) memset(info,0,sizeof(info));
+        status=cmsGetProfileInfoASCII(icc_profile,cmsInfoDescription,"en","US",
+          info,MagickPathExtent);
+        if (status != 0)
           (void) SetImageProperty((Image *) image,"icc:description",info,
             exception);
-        if (cmsGetProfileInfoASCII(icc_profile,cmsInfoManufacturer,"en","US",
-              info,MagickPathExtent) != 0)
+        status=cmsGetProfileInfoASCII(icc_profile,cmsInfoManufacturer,"en","US",
+          info,MagickPathExtent);
+        if (status != 0)
           (void) SetImageProperty((Image *) image,"icc:manufacturer",info,
             exception);
-        if (cmsGetProfileInfoASCII(icc_profile,cmsInfoModel,"en","US",info,
-              MagickPathExtent) != 0)
+        status=cmsGetProfileInfoASCII(icc_profile,cmsInfoModel,"en","US",
+          info,MagickPathExtent);
+        if (status != 0)
           (void) SetImageProperty((Image *) image,"icc:model",info,exception);
-        if (cmsGetProfileInfoASCII(icc_profile,cmsInfoCopyright,"en","US",
-              info,MagickPathExtent) != 0)
+        status=cmsGetProfileInfoASCII(icc_profile,cmsInfoCopyright,"en","US",
+          info,MagickPathExtent);
+        if (status != 0)
           (void) SetImageProperty((Image *) image,"icc:copyright",info,
             exception);
 #endif