aboutsummaryrefslogtreecommitdiff
path: root/graphics/poppler
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2005-08-13 08:22:51 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2005-08-13 08:22:51 +0000
commit397439cc5b94b4dffad767ad915fd56baddd2f98 (patch)
tree1c0ae6b31eb0802360e61ac022fe8a276cc0e0e3 /graphics/poppler
parent1c87b740d900a5f1b319074e640c11d9df20f043 (diff)
downloadports-397439cc5b94b4dffad767ad915fd56baddd2f98.tar.gz
ports-397439cc5b94b4dffad767ad915fd56baddd2f98.zip
Notes
Diffstat (limited to 'graphics/poppler')
-rw-r--r--graphics/poppler/Makefile1
-rw-r--r--graphics/poppler/files/patch-security58
2 files changed, 59 insertions, 0 deletions
diff --git a/graphics/poppler/Makefile b/graphics/poppler/Makefile
index 166a0cf377ae..9307727c6c08 100644
--- a/graphics/poppler/Makefile
+++ b/graphics/poppler/Makefile
@@ -7,6 +7,7 @@
PORTNAME= poppler
PORTVERSION= 0.3.1
+PORTREVISION= 1
CATEGORIES= graphics print
MASTER_SITES= http://poppler.freedesktop.org/
diff --git a/graphics/poppler/files/patch-security b/graphics/poppler/files/patch-security
new file mode 100644
index 000000000000..8b1b1c2a505e
--- /dev/null
+++ b/graphics/poppler/files/patch-security
@@ -0,0 +1,58 @@
+--- fofi/FoFiTrueType.cc.orig Thu Jan 22 02:26:44 2004
++++ fofi/FoFiTrueType.cc Thu Aug 11 16:55:52 2005
+@@ -1343,6 +1343,27 @@
+ return;
+ }
+
++ // make sure the loca table is sane (correct length and entries are
++ // in bounds)
++ i = seekTable("loca");
++ if (tables[i].len < (nGlyphs + 1) * (locaFmt ? 4 : 2)) {
++ parsedOk = gFalse;
++ return;
++ }
++ for (j = 0; j <= nGlyphs; ++j) {
++ if (locaFmt) {
++ pos = (int)getU32BE(tables[i].offset + j*4, &parsedOk);
++ } else {
++ pos = getU16BE(tables[i].offset + j*2, &parsedOk);
++ }
++ if (pos < 0 || pos > len) {
++ parsedOk = gFalse;
++ }
++ }
++ if (!parsedOk) {
++ return;
++ }
++
+ // read the post table
+ readPostTable();
+ if (!parsedOk) {
+--- poppler/SplashOutputDev.cc.orig Thu Aug 11 16:51:38 2005
++++ poppler/SplashOutputDev.cc Thu Aug 11 16:55:52 2005
+@@ -621,16 +621,19 @@
+ }
+ break;
+ case fontTrueType:
+- if (!(ff = FoFiTrueType::load(fileName->getCString()))) {
+- goto err2;
++ if ((ff = FoFiTrueType::load(fileName->getCString()))) {
++ codeToGID = ((Gfx8BitFont *)gfxFont)->getCodeToGIDMap(ff);
++ n = 256;
++ delete ff;
++ } else {
++ codeToGID = NULL;
++ n = 0;
+ }
+- codeToGID = ((Gfx8BitFont *)gfxFont)->getCodeToGIDMap(ff);
+- delete ff;
+ if (!(fontFile = fontEngine->loadTrueTypeFont(
+ id,
+ fileName->getCString(),
+ fileName == tmpFileName,
+- codeToGID, 256))) {
++ codeToGID, n))) {
+ error(-1, "Couldn't create a font for '%s'",
+ gfxFont->getName() ? gfxFont->getName()->getCString()
+ : "(unnamed)");
+