? 01-xpdf-3.00pl1.patch ? 02-xpdf-3.00pl2.patch ? 03-xpdf-3.00pl3.patch ? 10-xpdf-3.01-docs.patch ? 11-xpdf-3.01-fixedpoint.patch ? 12-xpdf-3.01-no-no-decryption.patch ? 13-xpdf-3.01-goo-allocn.patch ? 14-xpdf-3.01-copyright-etc-updates.patch ? 15-xpdf-3.01-new-freetype.patch ? 16-xpdf-3.01-plugins.patch ? 17-xpdf-3.01-goo-improvements.patch ? 18-xpdf-3.01-configure-improvements.patch ? 19-xpdf-3.01-encrypt-metadata-flag.patch ? 20-xpdf-3.01-win32-no-unlink.patch ? 21-xpdf-3.01-win32-files-and-paths.patch ? 24-xpdf-3.01-splash-modified-region.patch ? 25-xpdf-3.01-cropbox-as-page-size.patch ? patches Index: poppler/CMap.cc =================================================================== RCS file: /cvs/poppler/poppler/poppler/CMap.cc,v retrieving revision 1.2 diff -u -r1.2 CMap.cc --- poppler/CMap.cc 27 Aug 2005 08:43:43 -0000 1.2 +++ poppler/CMap.cc 15 Sep 2005 14:18:49 -0000 @@ -49,7 +49,7 @@ PSTokenizer *pst; char tok1[256], tok2[256], tok3[256]; int n1, n2, n3; - Guint start, end; + Guint start, end, code; if (!(f = globalParams->findCMapFile(collectionA, cMapNameA))) { @@ -99,6 +99,30 @@ } } pst->getToken(tok1, sizeof(tok1), &n1); + } else if (!strcmp(tok2, "begincidchar")) { + while (pst->getToken(tok1, sizeof(tok1), &n1)) { + if (!strcmp(tok1, "endcidchar")) { + break; + } + if (!pst->getToken(tok2, sizeof(tok2), &n2) || + !strcmp(tok2, "endcidchar")) { + error(-1, "Illegal entry in cidchar block in CMap"); + break; + } + if (!(tok1[0] == '<' && tok1[n1 - 1] == '>' && + n1 >= 4 && (n1 & 1) == 0)) { + error(-1, "Illegal entry in cidchar block in CMap"); + continue; + } + tok1[n1 - 1] = '\0'; + if (sscanf(tok1 + 1, "%x", &code) != 1) { + error(-1, "Illegal entry in cidchar block in CMap"); + continue; + } + n1 = (n1 - 2) / 2; + cmap->addCIDs(code, code, n1, (CID)atoi(tok2)); + } + pst->getToken(tok1, sizeof(tok1), &n1); } else if (!strcmp(tok2, "begincidrange")) { while (pst->getToken(tok1, sizeof(tok1), &n1)) { if (!strcmp(tok1, "endcidrange")) { @@ -234,7 +258,7 @@ for (i = nBytes - 1; i >= 1; --i) { byte = (start >> (8 * i)) & 0xff; if (!vec[byte].isVector) { - error(-1, "Invalid CID (%*x - %*x) in CMap", + error(-1, "Invalid CID (%0*x - %0*x) in CMap", 2*nBytes, start, 2*nBytes, end); return; } @@ -243,7 +267,7 @@ cid = firstCID; for (byte = (int)(start & 0xff); byte <= (int)(end & 0xff); ++byte) { if (vec[byte].isVector) { - error(-1, "Invalid CID (%*x - %*x) in CMap", + error(-1, "Invalid CID (%0*x - %0*x) in CMap", 2*nBytes, start, 2*nBytes, end); } else { vec[byte].cid = cid;