diff options
author | marcus <marcus@FreeBSD.org> | 2005-08-13 16:22:51 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2005-08-13 16:22:51 +0800 |
commit | a43b8a2ef3aee46380a2d9943631aa23cafc31b7 (patch) | |
tree | 7b1fb4dd3011d4aa49b581a2a8a03bba9e2369f2 /graphics/poppler | |
parent | 718a37cb6d69b029429fbacd45cc66552ab6fec5 (diff) | |
download | freebsd-ports-gnome-a43b8a2ef3aee46380a2d9943631aa23cafc31b7.tar.gz freebsd-ports-gnome-a43b8a2ef3aee46380a2d9943631aa23cafc31b7.tar.zst freebsd-ports-gnome-a43b8a2ef3aee46380a2d9943631aa23cafc31b7.zip |
Fix a security problem described at
http://vuxml.FreeBSD.org/24eee285-09c7-11da-bc08-0001020eed82.html.
Reported by: simon
Obtained from: graphics/xpdf
Approved by: portmgr (implicit)
Security: Fixes xpdf vulnerability
Diffstat (limited to 'graphics/poppler')
-rw-r--r-- | graphics/poppler/Makefile | 1 | ||||
-rw-r--r-- | graphics/poppler/files/patch-security | 58 |
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)"); + |