From: cristy Date: Fri, 28 Nov 2014 17:13:51 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~1702 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b231d58cfef5256d51ad3bf005020e8b3b69dcd2;p=imagemagick --- diff --git a/coders/ps.c b/coders/ps.c index 2affd2498..06dae2082 100644 --- a/coders/ps.c +++ b/coders/ps.c @@ -641,11 +641,14 @@ static Image *ReadPSImage(const ImageInfo *image_info,ExceptionInfo *exception) continue; length=extent; profile=BlobToStringInfo((const void *) NULL,length); - p=GetStringInfoDatum(profile); - for (i=0; i < (ssize_t) length; i++) - *p++=(unsigned char) ProfileInteger(image,hex_digits); - (void) SetImageProfile(image,"8bim",profile,exception); - profile=DestroyStringInfo(profile); + if (profile != (StringInfo *) NULL) + { + p=GetStringInfoDatum(profile); + for (i=0; i < (ssize_t) length; i++) + *p++=(unsigned char) ProfileInteger(image,hex_digits); + (void) SetImageProfile(image,"8bim",profile,exception); + profile=DestroyStringInfo(profile); + } continue; } if (LocaleNCompare(BeginXMPPacket,command,strlen(BeginXMPPacket)) == 0)