]> granicus.if.org Git - imagemagick/commitdiff
Use bigger steps when increasing the size of the profile.
authorDirk Lemstra <dirk@lemstra.org>
Sun, 7 Jul 2019 14:21:07 +0000 (16:21 +0200)
committerDirk Lemstra <dirk@lemstra.org>
Sun, 7 Jul 2019 14:21:07 +0000 (16:21 +0200)
coders/pdf.c

index 36b04eff24f7cac8d6788ee3633ea4dfbc64f162..7bc8a623672673b4dcdab66990a7a95c0a87295f 100644 (file)
@@ -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;
       }