From: Cristy Date: Sat, 12 May 2018 00:56:37 +0000 (-0400) Subject: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8234 X-Git-Tag: 7.0.7-32~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f8766ec663b1faeda81c0c3a8e855f6502276fa9;p=imagemagick https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8234 --- diff --git a/MagickCore/property.c b/MagickCore/property.c index 419600dab..09b532bec 100644 --- a/MagickCore/property.c +++ b/MagickCore/property.c @@ -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