From: Dirk Lemstra Date: Sun, 7 Jul 2019 14:21:07 +0000 (+0200) Subject: Use bigger steps when increasing the size of the profile. X-Git-Tag: 7.0.8-54~81 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0c2f93a4a2eec484c251af9fe2f850df36de401a;p=imagemagick Use bigger steps when increasing the size of the profile. --- diff --git a/coders/pdf.c b/coders/pdf.c index 36b04eff2..7bc8a6236 100644 --- a/coders/pdf.c +++ b/coders/pdf.c @@ -485,7 +485,7 @@ static void ReadPDFXMPProfile(PDFInfo *pdf_info,PDFBuffer *buffer) return; if (ComparePDFBuffer(BeginXMPPacket,buffer,strlen(BeginXMPPacket)) == MagickFalse) return; - length=MagickPathExtent; + length=8192; pdf_info->profile=AcquireStringInfo(length); found_end=MagickFalse; p=(char *) GetStringInfoDatum(pdf_info->profile); @@ -495,7 +495,7 @@ static void ReadPDFXMPProfile(PDFInfo *pdf_info,PDFBuffer *buffer) { if (count == (ssize_t) length) { - length+=MagickPathExtent; + length+=length; SetStringInfoLength(pdf_info->profile,length); p=(char *) GetStringInfoDatum(pdf_info->profile)+count; }