diff options
author | Michael Nottebrock <lofi@FreeBSD.org> | 2005-08-02 20:19:25 +0000 |
---|---|---|
committer | Michael Nottebrock <lofi@FreeBSD.org> | 2005-08-02 20:19:25 +0000 |
commit | 97b835e22552ac7e12804dd2fb89575722587d71 (patch) | |
tree | 98810b36ea0c684e9bc0bbac4c06788c1356fc09 /graphics/kdegraphics3 | |
parent | a49971069e1c25950cfb1fe641de62ed276b18ee (diff) | |
download | ports-97b835e22552ac7e12804dd2fb89575722587d71.tar.gz ports-97b835e22552ac7e12804dd2fb89575722587d71.zip |
Fix a regression in kpdf that prevents it from opening a great number
of PDF files.
Approved by: portmgr (krion)
Notes
Notes:
svn path=/head/; revision=140740
Diffstat (limited to 'graphics/kdegraphics3')
-rw-r--r-- | graphics/kdegraphics3/Makefile | 1 | ||||
-rw-r--r-- | graphics/kdegraphics3/files/patch-kpdf_xpdf_xpdf-PDFDOC.cc | 34 |
2 files changed, 35 insertions, 0 deletions
diff --git a/graphics/kdegraphics3/Makefile b/graphics/kdegraphics3/Makefile index 4b49bf3ae684..40fd6748e580 100644 --- a/graphics/kdegraphics3/Makefile +++ b/graphics/kdegraphics3/Makefile @@ -8,6 +8,7 @@ PORTNAME= kdegraphics PORTVERSION= ${KDE_VERSION} +PORTREVISION= 1 CATEGORIES= graphics kde MASTER_SITES= ${MASTER_SITE_KDE} MASTER_SITE_SUBDIR= stable/${PORTVERSION:S/.0//}/src diff --git a/graphics/kdegraphics3/files/patch-kpdf_xpdf_xpdf-PDFDOC.cc b/graphics/kdegraphics3/files/patch-kpdf_xpdf_xpdf-PDFDOC.cc new file mode 100644 index 000000000000..23167b544f9f --- /dev/null +++ b/graphics/kdegraphics3/files/patch-kpdf_xpdf_xpdf-PDFDOC.cc @@ -0,0 +1,34 @@ +--- kpdf/xpdf/xpdf/PDFDoc.cc.orig Tue Aug 2 19:37:37 2005 ++++ kpdf/xpdf/xpdf/PDFDoc.cc Tue Aug 2 19:43:32 2005 +@@ -115,24 +115,20 @@ + GBool PDFDoc::setup(GString *ownerPassword, GString *userPassword) { + str->reset(); + +- char eof[8]; ++ char *eof = new char[1025]; + int pos = str->getPos(); +- str->setPos(7, -1); +- eof[0] = str->getChar(); +- eof[1] = str->getChar(); +- eof[2] = str->getChar(); +- eof[3] = str->getChar(); +- eof[4] = str->getChar(); +- eof[5] = str->getChar(); +- eof[6] = str->getChar(); +- eof[7] = '\0'; ++ str->setPos(1024, -1); ++ for (int i = 0; i < 1024; i++) eof[i] = str->getChar(); ++ eof[1024] = '\0'; + if (strstr(eof, "%%EOF") == NULL) + { + error(-1, "Document does not have ending %%EOF"); + errCode = errDamaged; ++ delete[] eof; + return gFalse; + } +- ++ delete[] eof; ++ + str->setPos(pos); + + // check header |