continue;
if ((MagickSizeType) extent > GetBlobSize(image))
continue;
- ps_info->photoshop_profile=AcquireStringInfo((size_t) extent);
+ length=(size_t) extent;
+ ps_info->photoshop_profile=AcquireStringInfo(length+1U);
q=GetStringInfoDatum(ps_info->photoshop_profile);
- while (extent > 1)
+ while (extent > 0)
{
c=ProfileInteger(&buffer,hex_digits);
if (c == EOF)
*q++=(unsigned char) c;
extent-=2;
}
+ SetStringInfoLength(ps_info->icc_profile,length);
continue;
}
if (image_info->page != (char *) NULL)