Compare commits
98 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc5cf579cc | ||
|
|
dd61cc0a6f | ||
|
|
445565f0a7 | ||
|
|
102c70d26b | ||
|
|
6a51610411 | ||
|
|
a380722409 | ||
|
|
e8b04e115d | ||
|
|
99957267e9 | ||
|
|
2c55f22d9d | ||
|
|
1d3569c94e | ||
|
|
f6f060eee0 | ||
|
|
cb08af0fe9 | ||
|
|
bfd1224963 | ||
|
|
056c71eb88 | ||
|
|
1d7d4dd633 | ||
|
|
3329a5d8b4 | ||
|
|
ebc5729557 | ||
|
|
ea30f82cbd | ||
|
|
83b7840b44 | ||
|
|
ebf799c1ca | ||
|
|
fbb055f859 | ||
|
|
4405d18447 | ||
|
|
cec4559d3d | ||
|
|
28cb85d019 | ||
|
|
09a58bb043 | ||
|
|
fa76938a06 | ||
|
|
848c5d212b | ||
|
|
763cd44c6a | ||
|
8ff5952173 |
|||
|
|
2f849018b1 | ||
|
|
8b47d1e87c | ||
|
|
542eb321ea | ||
|
|
8519e3004d | ||
|
|
feedce6864 | ||
|
|
eb798fdbda | ||
|
|
d7f1600cea | ||
|
|
7334e2956e | ||
|
|
4ad1913390 | ||
|
|
4d4b8daed4 | ||
| add024a570 | |||
|
4f5907b5b3 |
|||
|
|
b5d52e96b1 | ||
|
|
d5f166a4b6 | ||
| a75fdf9444 | |||
|
|
1c211d50f2 | ||
|
|
53d1c3b612 | ||
|
|
85ecd3a080 | ||
|
|
41efb503bf | ||
|
|
0cd5a4e128 | ||
|
|
1c4d18e4ec | ||
|
|
752fce5e62 | ||
|
|
1b2c6bf04f | ||
|
|
0f746fdeab | ||
|
|
98434c99a1 | ||
|
|
736bdc29b9 | ||
|
|
7bb177660a | ||
|
|
30a93c5c6b | ||
|
|
efaabc0150 | ||
|
|
8f7ab5c178 | ||
|
|
f8865fac84 | ||
|
|
f0a27338ae | ||
|
|
e8ba2a976c | ||
|
|
7a77c71ab3 | ||
| 00a8309acb | |||
|
|
29000395f4 | ||
|
|
fd37020261 | ||
|
|
c11e39a194 | ||
|
|
99621ebe33 | ||
|
|
ef59550e71 | ||
|
|
d57d96bb16 | ||
|
|
1cf187db7a | ||
|
|
e804465562 | ||
|
|
f1529f5842 | ||
|
|
84fe4c7860 | ||
|
|
daae1cf156 | ||
|
|
6328fa1bbc | ||
|
|
fe0826c4b7 | ||
|
|
24a30ac873 | ||
|
|
b188a15c13 | ||
|
|
b3eacf5fae | ||
|
|
f02e87eaef | ||
|
|
eb4b7782cf | ||
|
|
5b628c3fdb | ||
|
|
9542866832 | ||
|
|
f40d143aa3 | ||
|
|
05638cac97 | ||
|
|
355383cf07 | ||
|
|
7afecabb07 | ||
|
|
8c6cc6ecc2 | ||
|
|
c125c60c61 | ||
|
|
0a3c14c197 | ||
|
|
60735825ee | ||
|
|
bed41332f7 | ||
|
|
defe5a081d | ||
|
|
13020db41b | ||
|
|
0d8a4e6a9c | ||
|
|
d21fd7e7b2 | ||
|
|
721794f391 |
49 changed files with 4741 additions and 185 deletions
|
|
@ -1,7 +0,0 @@
|
|||
xpdf-3.01-novms.tar.gz
|
||||
xpdf-chinese-simplified-2004-jul-27-NOCMAP.tar.gz
|
||||
xpdf-chinese-traditional-2004-jul-27-NOCMAP.tar.gz
|
||||
xpdf-cyrillic-2003-jun-28.tar.gz
|
||||
xpdf-japanese-2004-jul-27-NOCMAP.tar.gz
|
||||
xpdf-korean-2005-jul-07-NOCMAP.tar.gz
|
||||
xpdf-thai-2002-jan-16.tar.gz
|
||||
46
.gitignore
vendored
Normal file
46
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
xpdf-3.01-novms.tar.gz
|
||||
xpdf-chinese-simplified-2004-jul-27-NOCMAP.tar.gz
|
||||
xpdf-chinese-traditional-2004-jul-27-NOCMAP.tar.gz
|
||||
xpdf-cyrillic-2003-jun-28.tar.gz
|
||||
xpdf-japanese-2004-jul-27-NOCMAP.tar.gz
|
||||
xpdf-korean-2005-jul-07-NOCMAP.tar.gz
|
||||
xpdf-thai-2002-jan-16.tar.gz
|
||||
xpdf-arabic-2003-feb-16.tar.gz
|
||||
xpdf-greek-2003-jun-28.tar.gz
|
||||
xpdf-hebrew-2003-feb-16.tar.gz
|
||||
xpdf-latin2-2002-oct-22.tar.gz
|
||||
xpdf-turkish-2002-apr-10.tar.gz
|
||||
xpdf-3.02-novms.tar.gz
|
||||
/xpdf-3.03-novms.tar.gz
|
||||
/xpdf-3.04.tar.gz
|
||||
/xpdf-arabic-2011-aug-15.tar.gz
|
||||
/xpdf-chinese-simplified-2011-sep-02-NOCMAP.tar.gz
|
||||
/xpdf-chinese-traditional-2011-sep-02-NOCMAP.tar.gz
|
||||
/xpdf-cyrillic-2011-aug-15.tar.gz
|
||||
/xpdf-greek-2011-aug-15.tar.gz
|
||||
/xpdf-hebrew-2011-aug-15.tar.gz
|
||||
/xpdf-japanese-2011-sep-02-NOCMAP.tar.gz
|
||||
/xpdf-korean-2011-sep-02-NOCMAP.tar.gz
|
||||
/xpdf-latin2-2011-aug-15.tar.gz
|
||||
/xpdf-thai-2011-aug-15.tar.gz
|
||||
/xpdf-turkish-2011-aug-15.tar.gz
|
||||
/xpdf-4.00.tar.gz
|
||||
/xpdf-chinese-simplified-2017-jul-25-NOCMAP.tar.gz
|
||||
/xpdf-chinese-traditional-2017-jul-25-NOCMAP.tar.gz
|
||||
/xpdf-japanese-2017-jul-25-NOCMAP.tar.gz
|
||||
/xpdf-korean-2017-jul-25-NOCMAP.tar.gz
|
||||
/xpdf-4.01.tar.gz
|
||||
/xpdf-4.02.tar.gz
|
||||
/xpdf-chinese-simplified-2020-dec-22-NOCMAP.tar.gz
|
||||
/xpdf-chinese-traditional-2020-dec-22-NOCMAP.tar.gz
|
||||
/xpdf-japanese-2020-dec-22-NOCMAP.tar.gz
|
||||
/xpdf-korean-2020-dec-22-NOCMAP.tar.gz
|
||||
/xpdf-4.03.tar.gz
|
||||
/xpdf-4.04.tar.gz
|
||||
/xpdf-4.05.tar.gz
|
||||
/xpdf-chinese-simplified-2023-dec-05-NOCMAP.tar.gz
|
||||
/xpdf-korean-2023-dec-05-NOCMAP.tar.gz
|
||||
/xpdf-4.05.tar.gz.sig
|
||||
/xpdf-thai.tar.gz
|
||||
/xpdf-4.06.tar.gz
|
||||
/xpdf-4.06.tar.gz.sig
|
||||
172
02_permissions.dpatch
Normal file
172
02_permissions.dpatch
Normal file
|
|
@ -0,0 +1,172 @@
|
|||
diff -up xpdf-3.04/xpdf/PDFCore.cc.permissions xpdf-3.04/xpdf/PDFCore.cc
|
||||
--- xpdf-3.04/xpdf/PDFCore.cc.permissions 2014-05-28 14:50:50.000000000 -0400
|
||||
+++ xpdf-3.04/xpdf/PDFCore.cc 2014-05-29 15:42:47.290665898 -0400
|
||||
@@ -4,6 +4,8 @@
|
||||
//
|
||||
// Copyright 2004-2013 Glyph & Cog, LLC
|
||||
//
|
||||
+// Modified for Debian by Hamish Moffatt, 18 August 2005.
|
||||
+//
|
||||
//========================================================================
|
||||
|
||||
#include <aconf.h>
|
||||
@@ -1677,9 +1679,11 @@ GString *PDFCore::extractText(int pg, do
|
||||
int x0, y0, x1, y1, t;
|
||||
GString *s;
|
||||
|
||||
+#ifdef ENFORCE_PERMISSIONS
|
||||
if (!doc->okToCopy()) {
|
||||
return NULL;
|
||||
}
|
||||
+#endif
|
||||
if ((page = findPage(pg))) {
|
||||
cvtUserToDev(pg, xMin, yMin, &x0, &y0);
|
||||
cvtUserToDev(pg, xMax, yMax, &x1, &y1);
|
||||
diff -up xpdf-3.04/xpdf/pdfimages.cc.permissions xpdf-3.04/xpdf/pdfimages.cc
|
||||
--- xpdf-3.04/xpdf/pdfimages.cc.permissions 2014-05-28 14:50:50.000000000 -0400
|
||||
+++ xpdf-3.04/xpdf/pdfimages.cc 2014-05-29 15:40:57.814449375 -0400
|
||||
@@ -4,6 +4,8 @@
|
||||
//
|
||||
// Copyright 1998-2003 Glyph & Cog, LLC
|
||||
//
|
||||
+// Modified for Debian by Hamish Moffatt, 22 May 2002.
|
||||
+//
|
||||
//========================================================================
|
||||
|
||||
#include <aconf.h>
|
||||
@@ -119,12 +121,14 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
// check for copy permission
|
||||
+#ifdef ENFORCE_PERMISSIONS
|
||||
if (!doc->okToCopy()) {
|
||||
error(errNotAllowed, -1,
|
||||
"Copying of images from this document is not allowed.");
|
||||
exitCode = 3;
|
||||
goto err1;
|
||||
}
|
||||
+#endif
|
||||
|
||||
// get page range
|
||||
if (firstPage < 1)
|
||||
diff -up xpdf-3.04/xpdf/pdftops.cc.permissions xpdf-3.04/xpdf/pdftops.cc
|
||||
--- xpdf-3.04/xpdf/pdftops.cc.permissions 2014-05-28 14:50:50.000000000 -0400
|
||||
+++ xpdf-3.04/xpdf/pdftops.cc 2014-05-29 15:40:57.815449368 -0400
|
||||
@@ -4,6 +4,8 @@
|
||||
//
|
||||
// Copyright 1996-2003 Glyph & Cog, LLC
|
||||
//
|
||||
+// Modified for Debian by Hamish Moffatt, 22 May 2002.
|
||||
+//
|
||||
//========================================================================
|
||||
|
||||
#include <aconf.h>
|
||||
@@ -300,12 +302,14 @@ int main(int argc, char *argv[]) {
|
||||
goto err1;
|
||||
}
|
||||
|
||||
+#ifdef ENFORCE_PERMISSIONS
|
||||
// check for print permission
|
||||
if (!doc->okToPrint()) {
|
||||
error(errNotAllowed, -1, "Printing this document is not allowed.");
|
||||
exitCode = 3;
|
||||
goto err1;
|
||||
}
|
||||
+#endif
|
||||
|
||||
// construct PostScript file name
|
||||
if (argc == 3) {
|
||||
diff -up xpdf-3.04/xpdf/pdftotext.cc.permissions xpdf-3.04/xpdf/pdftotext.cc
|
||||
--- xpdf-3.04/xpdf/pdftotext.cc.permissions 2014-05-28 14:50:50.000000000 -0400
|
||||
+++ xpdf-3.04/xpdf/pdftotext.cc 2014-05-29 15:43:37.923303455 -0400
|
||||
@@ -4,6 +4,8 @@
|
||||
//
|
||||
// Copyright 1997-2013 Glyph & Cog, LLC
|
||||
//
|
||||
+// Modified for Debian by Hamish Moffatt, 22 May 2002.
|
||||
+//
|
||||
//========================================================================
|
||||
|
||||
#include <aconf.h>
|
||||
@@ -188,6 +190,7 @@ int main(int argc, char *argv[]) {
|
||||
goto err2;
|
||||
}
|
||||
|
||||
+#ifdef ENFORCE_PERMISSIONS
|
||||
// check for copy permission
|
||||
if (!doc->okToCopy()) {
|
||||
error(errNotAllowed, -1,
|
||||
@@ -195,6 +198,7 @@ int main(int argc, char *argv[]) {
|
||||
exitCode = 3;
|
||||
goto err2;
|
||||
}
|
||||
+#endif
|
||||
|
||||
// construct text file name
|
||||
if (argc == 3) {
|
||||
diff -up xpdf-3.04/xpdf/XPDFCore.cc.permissions xpdf-3.04/xpdf/XPDFCore.cc
|
||||
--- xpdf-3.04/xpdf/XPDFCore.cc.permissions 2014-05-29 15:40:57.777449640 -0400
|
||||
+++ xpdf-3.04/xpdf/XPDFCore.cc 2014-05-29 15:40:57.819449339 -0400
|
||||
@@ -4,6 +4,8 @@
|
||||
//
|
||||
// Copyright 2002-2003 Glyph & Cog, LLC
|
||||
//
|
||||
+// Modified for Debian by Hamish Moffatt, 22 May 2002.
|
||||
+//
|
||||
//========================================================================
|
||||
|
||||
#include <aconf.h>
|
||||
@@ -384,12 +386,16 @@ void XPDFCore::endSelection(int wx, int
|
||||
#ifndef NO_TEXT_SELECT
|
||||
if (selectULX != selectLRX &&
|
||||
selectULY != selectLRY) {
|
||||
+#ifdef ENFORCE_PERMISSIONS
|
||||
if (doc->okToCopy()) {
|
||||
copySelection();
|
||||
} else {
|
||||
error(errNotAllowed, -1,
|
||||
"Copying of text from this document is not allowed.");
|
||||
}
|
||||
+#else
|
||||
+ copySelection();
|
||||
+#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -408,9 +414,11 @@ void XPDFCore::copySelection() {
|
||||
int pg;
|
||||
double ulx, uly, lrx, lry;
|
||||
|
||||
+#ifdef ENFORCE_PERMISSIONS
|
||||
if (!doc->okToCopy()) {
|
||||
return;
|
||||
}
|
||||
+#endif
|
||||
if (getSelection(&pg, &ulx, &uly, &lrx, &lry)) {
|
||||
//~ for multithreading: need a mutex here
|
||||
if (currentSelection) {
|
||||
diff -up xpdf-3.04/xpdf/XPDFViewer.cc.permissions xpdf-3.04/xpdf/XPDFViewer.cc
|
||||
--- xpdf-3.04/xpdf/XPDFViewer.cc.permissions 2014-05-29 15:40:57.808449418 -0400
|
||||
+++ xpdf-3.04/xpdf/XPDFViewer.cc 2014-05-29 15:40:57.821449325 -0400
|
||||
@@ -4,6 +4,8 @@
|
||||
//
|
||||
// Copyright 2002-2003 Glyph & Cog, LLC
|
||||
//
|
||||
+// Modified for Debian by Hamish Moffatt, 22 May 2002.
|
||||
+//
|
||||
//========================================================================
|
||||
|
||||
#include <aconf.h>
|
||||
@@ -3503,10 +3505,12 @@ void XPDFViewer::printPrintCbk(Widget wi
|
||||
PSOutputDev *psOut;
|
||||
|
||||
doc = viewer->core->getDoc();
|
||||
+#ifdef ENFORCE_PERMISSIONS
|
||||
if (!doc->okToPrint()) {
|
||||
error(errNotAllowed, -1, "Printing this document is not allowed.");
|
||||
return;
|
||||
}
|
||||
+#endif
|
||||
|
||||
viewer->core->setBusyCursor(gTrue);
|
||||
|
||||
33
10_add_accelerators.dpatch
Normal file
33
10_add_accelerators.dpatch
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 10_add_accelerators.dpatch by <hamish@noddy.cloud.net.au>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: Add keyboard accelerators for rotate (#385962)
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad xpdf-3.02~/xpdf/XPDFViewer.cc xpdf-3.02/xpdf/XPDFViewer.cc
|
||||
--- xpdf-3.02~/xpdf/XPDFViewer.cc 2007-04-25 01:40:50.000000000 +1000
|
||||
+++ xpdf-3.02/xpdf/XPDFViewer.cc 2007-04-25 01:42:13.000000000 +1000
|
||||
@@ -1958,16 +1958,22 @@
|
||||
n = 0;
|
||||
s = XmStringCreateLocalized("Rotate counterclockwise");
|
||||
XtSetArg(args[n], XmNlabelString, s); ++n;
|
||||
+ s2 = XmStringCreateLocalized("[");
|
||||
+ XtSetArg(args[n], XmNacceleratorText, s2); ++n;
|
||||
btn = XmCreatePushButton(popupMenu, "rotateCCW", args, n);
|
||||
XmStringFree(s);
|
||||
+ XmStringFree(s2);
|
||||
XtManageChild(btn);
|
||||
XtAddCallback(btn, XmNactivateCallback,
|
||||
&rotateCCWCbk, (XtPointer)this);
|
||||
n = 0;
|
||||
s = XmStringCreateLocalized("Rotate clockwise");
|
||||
XtSetArg(args[n], XmNlabelString, s); ++n;
|
||||
+ s2 = XmStringCreateLocalized("]");
|
||||
+ XtSetArg(args[n], XmNacceleratorText, s2); ++n;
|
||||
btn = XmCreatePushButton(popupMenu, "rotateCW", args, n);
|
||||
XmStringFree(s);
|
||||
+ XmStringFree(s2);
|
||||
XtManageChild(btn);
|
||||
XtAddCallback(btn, XmNactivateCallback,
|
||||
&rotateCWCbk, (XtPointer)this);
|
||||
21
Makefile
21
Makefile
|
|
@ -1,21 +0,0 @@
|
|||
# Makefile for source rpm: xpdf
|
||||
# $Id$
|
||||
NAME := xpdf
|
||||
SPECFILE = $(firstword $(wildcard *.spec))
|
||||
|
||||
define find-makefile-common
|
||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||
|
||||
ifeq ($(MAKEFILE_COMMON),)
|
||||
# attept a checkout
|
||||
define checkout-makefile-common
|
||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||
endif
|
||||
|
||||
include $(MAKEFILE_COMMON)
|
||||
42
fix-437725.dpatch
Normal file
42
fix-437725.dpatch
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## fix-437725.dpatch from Arno Renevier <arenevier@fdn.fr>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: Fix segmentation fault when pressing Ctrl-W in full screen mode
|
||||
|
||||
@DPATCH@
|
||||
--- a/xpdf/XPDFViewer.cc 2007-08-13 22:41:36.000000000 +0200
|
||||
+++ b/xpdf/XPDFViewer.cc 2007-08-13 23:01:07.000000000 +0200
|
||||
@@ -400,18 +400,21 @@ void XPDFViewer::clear() {
|
||||
title = app->getTitle() ? app->getTitle()->getCString()
|
||||
: (char *)xpdfAppName;
|
||||
XtVaSetValues(win, XmNtitle, title, XmNiconName, title, NULL);
|
||||
- s = XmStringCreateLocalized("");
|
||||
- XtVaSetValues(pageNumText, XmNlabelString, s, NULL);
|
||||
- XmStringFree(s);
|
||||
- s = XmStringCreateLocalized(" of 0");
|
||||
- XtVaSetValues(pageCountLabel, XmNlabelString, s, NULL);
|
||||
- XmStringFree(s);
|
||||
|
||||
- // disable buttons
|
||||
- XtVaSetValues(prevTenPageBtn, XmNsensitive, False, NULL);
|
||||
- XtVaSetValues(prevPageBtn, XmNsensitive, False, NULL);
|
||||
- XtVaSetValues(nextTenPageBtn, XmNsensitive, False, NULL);
|
||||
- XtVaSetValues(nextPageBtn, XmNsensitive, False, NULL);
|
||||
+ if (toolBar != None) {
|
||||
+ s = XmStringCreateLocalized("");
|
||||
+ XtVaSetValues(pageNumText, XmNlabelString, s, NULL);
|
||||
+ XmStringFree(s);
|
||||
+ s = XmStringCreateLocalized(" of 0");
|
||||
+ XtVaSetValues(pageCountLabel, XmNlabelString, s, NULL);
|
||||
+ XmStringFree(s);
|
||||
+
|
||||
+ // disable buttons
|
||||
+ XtVaSetValues(prevTenPageBtn, XmNsensitive, False, NULL);
|
||||
+ XtVaSetValues(prevPageBtn, XmNsensitive, False, NULL);
|
||||
+ XtVaSetValues(nextTenPageBtn, XmNsensitive, False, NULL);
|
||||
+ XtVaSetValues(nextPageBtn, XmNsensitive, False, NULL);
|
||||
+ }
|
||||
|
||||
// remove the old outline
|
||||
#ifndef DISABLE_OUTLINE
|
||||
18
fix-444648.dpatch
Normal file
18
fix-444648.dpatch
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## fix-444648.dpatch by Bernhard R. Link <brlink@debian.org>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: Do proper PS stream encoding on 64 bit architectures
|
||||
|
||||
@DPATCH@
|
||||
--- xpdf-3.02/xpdf/Stream.cc.BAD 2008-12-10 12:16:16.000000000 -0500
|
||||
+++ xpdf-3.02/xpdf/Stream.cc 2008-12-10 12:16:21.000000000 -0500
|
||||
@@ -4514,7 +4514,7 @@ void ASCII85Encoder::reset() {
|
||||
GBool ASCII85Encoder::fillBuf() {
|
||||
Guint t;
|
||||
char buf1[5];
|
||||
- int c0, c1, c2, c3;
|
||||
+ unsigned int c0, c1, c2, c3;
|
||||
int n, i;
|
||||
|
||||
if (eof) {
|
||||
28
fix-462544.dpatch
Normal file
28
fix-462544.dpatch
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## fix-462544.dpatch from Jiri Palecek <jpalecek@web.de>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: Fix segmentation fault in image handling
|
||||
|
||||
@DPATCH@
|
||||
--- xpdf-3.02/xpdf/SplashOutputDev.cc 2007-02-27 23:05:52.000000000 +0100
|
||||
+++ xpdf-3.02.new/xpdf/SplashOutputDev.cc 2008-02-17 17:28:46.000000000 +0100
|
||||
@@ -2475,14 +2461,14 @@
|
||||
tx = (int)floor(xMin);
|
||||
if (tx < 0) {
|
||||
tx = 0;
|
||||
- } else if (tx > bitmap->getWidth()) {
|
||||
- tx = bitmap->getWidth();
|
||||
+ } else if (tx >= bitmap->getWidth()) {
|
||||
+ tx = bitmap->getWidth()-1;
|
||||
}
|
||||
ty = (int)floor(yMin);
|
||||
if (ty < 0) {
|
||||
ty = 0;
|
||||
- } else if (ty > bitmap->getHeight()) {
|
||||
- ty = bitmap->getHeight();
|
||||
+ } else if (ty >= bitmap->getHeight()) {
|
||||
+ ty = bitmap->getHeight()-1;
|
||||
}
|
||||
w = (int)ceil(xMax) - tx + 1;
|
||||
if (tx + w > bitmap->getWidth()) {
|
||||
20
fix-479467.dpatch
Normal file
20
fix-479467.dpatch
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## fix-479467.dpatch from Stephan Beyer <s-beyer@gmx.net>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: Fix segmentation fault when pressing g in full screen mode
|
||||
|
||||
@DPATCH@
|
||||
diff -ruN xpdf-3.02.old/xpdf/XPDFViewer.cc xpdf-3.02.fix/xpdf/XPDFViewer.cc
|
||||
--- xpdf-3.02.old/xpdf/XPDFViewer.cc 2007-02-27 23:05:52.000000000 +0100
|
||||
+++ xpdf-3.02.fix/xpdf/XPDFViewer.cc 2008-05-04 21:29:34.000000000 +0200
|
||||
@@ -834,6 +834,9 @@
|
||||
|
||||
void XPDFViewer::cmdFocusToPageNum(GString *args[], int nArgs,
|
||||
XEvent *event) {
|
||||
+ if (core->getFullScreen()) {
|
||||
+ return;
|
||||
+ }
|
||||
XmTextFieldSetSelection(pageNumText, 0,
|
||||
strlen(XmTextFieldGetString(pageNumText)),
|
||||
XtLastTimestampProcessed(display));
|
||||
62
gpg-key.txt
Normal file
62
gpg-key.txt
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQINBFhmydMBEACjLpJGlKBzA5WFopW+qYGpwPvWLH/Dd3sEdHffxMxEbas06I7Y
|
||||
KE30JIlFfL4oZHaytDNSZraA7DpkoPQM0EOpFeK1sgxJUKH+CPeRxhdjAkH6SxU1
|
||||
dOLWL4CQPVRYWBcuxwW1asxHTJZtaeGnTmstNuhuzwjj4BlTRmA6MbSh/DBCN104
|
||||
6idBf+KCfm+SLYK2KxeYDEyYV/i6p1+TRs+PVmDXKyBanxiP3StZC+BCOLfXzg9S
|
||||
+LFLFvbKRdq2Ofn5nLULmk7+1VT44eXLQgw0pgBJ5OlFCaL6S5ZUbtyDzGxK/ECL
|
||||
4ozCwLDx93hrVtofPJpdqBfgAQpiGy0Rd9925EchkW7RTwkxSKa1YT8GI5fKatTj
|
||||
BA1p5+YuQ+ml2UaPmHxpc/AizsRI9OBD7NmoxW2RNt7CBLhRb0JscDtXpm7jvTnO
|
||||
bDPUOmH9klwKdkj+WACQaNrbD2BIN715JtTsRbgxpqQ3nHDug6xCVbZdvoln91+P
|
||||
TCE8zJ3wLWXCXrXLVV0ZQhVUNGk/u3gLOxG8HmYCfwSZQhgxViwupTHkRU41BoLe
|
||||
Iyja9GjuZw0CUPwABS7/jq0Td166ziFfzoBIxIsK1ikgW8kDhsfKXPOFo4qGAdjg
|
||||
yURKBk70GXR/U7B97ZJ3StWTcm3Y0B5NiyRaxMIYs5weVg2PE0X9ch0y0QARAQAB
|
||||
tBwtWHBkZi0gPHhwZGZAeHBkZnJlYWRlci5jb20+iQI3BBMBAgAhAhsDAh4BAheA
|
||||
BQJYZstXBQsJCAcDBRUKCQgLBRYCAwEAAAoJEPSCX1OXJxNCLlUQAJqSTuBNgzsF
|
||||
yvwccsbSbCXh79rr3xoYnlU4w7/sYEdAqUuXATUa9mxekecyauVWhpsm+LSUrquc
|
||||
TCYZOtcy8lqdQhNZtfZa9K9CJLG5fAQrflDI0ABBUb3rGkv4wegVKDoD8Xj9vdPd
|
||||
ThDsy7eV7tinfUAdoO9zguuGgQ7R1eYgMSwjIdK8lwcVwLorc3/RlrcV8fgnEW6m
|
||||
pZDcnoH2ogbTZMN7CrCa8IE/ggKe8iOV2fVgnL+r0Bj3dSlP9ZXBpuw9u9tO6s0H
|
||||
zI4NdbMoUzP5+H1FzeGJVt7NZJuGGmZz/FEVLWXwUElP1OGlAGNqsqXlChMEFDqo
|
||||
+rXcKUJyQebr6vOtWcVyyITzEkshFET/JCi+aIID9vggDcL6RmFlA8JtAbPP90TI
|
||||
tq94PXmFx+jQLrJ2vLhZGchlLn8wVZ/DeZP/y9rDZXUlhlllgLiN1CSD5iCMuL+T
|
||||
qHftFFF+C7MPIHBMGRjjOwmJtAWR/wwe4mrkuyKt4gF6nKQBqOsVuNt2RWAA27Ac
|
||||
CctX8ce8KuDfW4XJlr6BwIrzffa47nyBIZstGCptKMxGywvu+ufLgGz2kv78wO9X
|
||||
bg2kgFIbI1C7YI1KUUuoACFjDGCVbdnzSUS7pWOebXNQ+cvqy82ExMvv/ieD6Rfg
|
||||
jKZH7lj7cmA9YBqnUmXS/57GSQu94i18iQIcBBABCgAGBQJYZsySAAoJEBCYN7iF
|
||||
KMl4kI8P/3d0YYUVrA5f7C3FEuW11sedr3o/DDv/QA8Aj68gb/efG0nCzi5cIuL0
|
||||
7MM7St0VI9UypGl0kExforcu80Zk0x95RCYRb46e2lTNIXpNL3CstXquatDrZ66X
|
||||
bdOHOV5I/PQ8PJhAyy8pPdlShIz4dfcPT+JXoCX85gtdp/0vg84kaiuQNpbm3wjk
|
||||
/BJNPJovUea7K5c0KLwrcXy1vyPdW4I3vQvK9JWxewbZ/nK5Fu45yhK1lMvIqO2x
|
||||
fGSpYizVFLhuq85+qm2E4IMnlTC48ygWd3t5N+dYSU1XRjqFRzw4+dPgBqBomajW
|
||||
0yXgUUDnYS7a715ZhDblwt8sC5HgRIjpr7Sj4zgCW+MjrnyZBM22zu5CmUAfdkBx
|
||||
VH3igHF7IWDpXonC/nrbFauo4cnW4y4Sv+oH56UheQwtUykRgj9yZXL1cNin6ZXb
|
||||
vRPV7Kbza4d0y6m+kBFWXh0Befqijw4uXbXQIG1SSurKlQihV+cRBJSiMklDMVQ4
|
||||
hkFKra1Pgom9ZmOixmPnJclKObeVwF7CWIVsdIyiNEwkDx0MjYqlvRvnCIdmJ1ej
|
||||
5/d+D3uWpjI2UFkNI7KIdGARXE53dPh3frIwzwRWLh8InoK461z47ukQU3q3/eZI
|
||||
Ar9LP/6g6AlsLVjsqHTs9oMdN/YItQxQb/1bZxIrG6wuk9imlnd4uQINBFhmydMB
|
||||
EACc6p09brIdWJmpGOz1LxIEOOiL8hQo1oOlGeigFgLZ99TsJHV9rJ+oUuRsr9Kd
|
||||
MTf0g13NEHOyp0/8KJXSN4R/zVDykBdvVblNIDYUEyOVvvueVjcMKTOOt6iV2naC
|
||||
pkyRTDctgt04VeTau8r6hgYxWT5f2XtsKHNu+kv6RPc7GbSgubiaTujRcl+iOCXi
|
||||
tNKUNFQ83G1rvYOEaiaoGXQ4dRHW7u+St4b0bJLgO+FUovVxd714RWNZ4UleDVV8
|
||||
VzGkcU3j7B4u39GiVNgxGnmnfTA7AJ5YWLqRhfuf/uyEgs1Iety4/eZdwPtg2w0U
|
||||
JTo/T+mbRBS0cDXBm4+kYMeKHpN1yMmeaYA3bv/miz/ik1/HKhlned4t47TlhUFu
|
||||
jxkmvfTI6XtzRZ98607ICOAH7PKAv1YrQsxohSrVcRZK+4jofT4vMgcbFTFuRYMP
|
||||
EemYMAphPyHBPJG+YAVIM/S9MaWYYC/LR7jtkt/MosI3SLzw09rf9e1mCajaYb6q
|
||||
yCopfK84nao2gmFFE9vt7hOcmhGZ8WAlsL9rVW8nmBk3OZYIRWIxbB+iA0/et6E0
|
||||
1K4iQbeEu6pRDCA+Lkw2NWAOBVXgBKuvUDzXYV86wI+7m94IXuQQ2BXugstuVMWw
|
||||
AKqgbT+CTOc6Th1rzBI4bjJfUxm6eOsU/t3+2Gq1s8joxwARAQABiQIfBBgBAgAJ
|
||||
BQJYZsnTAhsMAAoJEPSCX1OXJxNC7ysP+wfpmD5kboss1cNbEfdbFZvwsh982Y3H
|
||||
FN4w0dvquJxJhSnfx64tnhjZCAPmVkUutfde3/fGylQ3v9j3kg/q0EJ56Df3QcFb
|
||||
QcJpyM+rfVI3eKuO/zH1TjMlhzKI/TgES1xCOCqTlmMPFY+akWAVFKk6/fVz6rhg
|
||||
tIJyj/7+lV7xWDNJZmyAuBPiNW6YPH92u4gDR3GPFQSClEetlD4heAOISph9C2fN
|
||||
QPmivr8jYMhbWr2kGvsfY2wgBOzeijmUYRyfoXxjHOo9tkMYik1DCdsXfxevbAa3
|
||||
Q6ybcwmx6QvjOlH4TLlv43JHettMudVGuiCBBTDtbUouX9+2vXRuCHeEzb7iusLC
|
||||
ZINce8kxs83EiTfa1J00eJ4vTK6z5yZN+29DC/00SdmUX0Agnoo5Msxi10o6wJLz
|
||||
Dsg81UFjL3rE0UQ2TBch6hAiUlvJF95E0fylWpL4rxuEeuxh4U/82wAR+1g4Fj3K
|
||||
YNQXjW8sko60VnCMTEBeJ7s09U/GIygb9Ixcoz1OhgIbpXox/0lqVpI9V0ekddc+
|
||||
n1LhYrjWIcBzK2t1t/0isI5mkkV4gztpRcVWoTEbynN37He3HFL90gN0zmGBE2oY
|
||||
gTfCw3gRA3iUJ4varAX9DF0baTQzh9wVdnYk9RIlZovkzmn45z5ogZ7B1xpHtuhl
|
||||
PYZrVz++lRb0
|
||||
=6AFt
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
20
sources
20
sources
|
|
@ -1,7 +1,13 @@
|
|||
e53ec72546bb1a010fc2a2730f6d80f5 xpdf-3.01-novms.tar.gz
|
||||
ba4b037ab691f8b029ec2b9820a2fb8c xpdf-chinese-simplified-2004-jul-27-NOCMAP.tar.gz
|
||||
697e7edc09a285115b597ab03f2eddf9 xpdf-chinese-traditional-2004-jul-27-NOCMAP.tar.gz
|
||||
7b22f31289ce0812d2ec77014e7b0cdf xpdf-cyrillic-2003-jun-28.tar.gz
|
||||
f759b1b9624c7364e5d5a1ab3d146597 xpdf-japanese-2004-jul-27-NOCMAP.tar.gz
|
||||
276624cddd1b70c29a3ae03ddb20fb3a xpdf-korean-2005-jul-07-NOCMAP.tar.gz
|
||||
96e058c1b0429ae1ba0b50f1784b0985 xpdf-thai-2002-jan-16.tar.gz
|
||||
SHA512 (xpdf-arabic-2011-aug-15.tar.gz) = 1ddaee045c0c3576bda0ebf065021e66e1ac6673d6872aff8e8afb3bae33dd927d920d89761553bade040d20e4b60eb286131bdb2f2d75ec1e833b9a9ce58d3e
|
||||
SHA512 (xpdf-cyrillic-2011-aug-15.tar.gz) = ab1197c90f8cd3d8664ebbdc7ecefdfb8ec12e24da2f7616cad1d5bc9c7fd172c48db6a18d76172de8342377acc8e1dcd78bcf0fb1ef9f05cf94729e90586827
|
||||
SHA512 (xpdf-greek-2011-aug-15.tar.gz) = 2e0e281e09e1abc2f0e40b6787703538d52cb62edcd4c4156698700a5f908afee290c62ad9a6ff4ea74bc42e0a8fe9a7765a212efbc223512d4bb442448ea52f
|
||||
SHA512 (xpdf-hebrew-2011-aug-15.tar.gz) = 0ebe652f8633151d13ef2403bd293682b511ab86c1391ce187f1fc0274f33bd9c7e6ec682c8f79ac4fd27c74ab81ad2ae334a75f26001092521cff9a73cd0b8a
|
||||
SHA512 (xpdf-latin2-2011-aug-15.tar.gz) = 5fe0b60bfac7f0f4a26e3e7216de5043f6b94446f464c984b7c25431ec01a5912952c0dc66bb2c7159c9f63e4805689c6cfc761086aad9e59f1f21d0cddb5d15
|
||||
SHA512 (xpdf-turkish-2011-aug-15.tar.gz) = a73e90bce8f2a12154b06ef29333a45d96258c0d653d5cb15afd2e5ad9e79a9b617e5f8ebeb20bde545684d50f3bc1349800c99f70c863bdd502c24c266b4fb1
|
||||
SHA512 (xpdf-chinese-traditional-2020-dec-22-NOCMAP.tar.gz) = ff25947dbf09b51f9c97aff898b8d33441af230d25c827380f1f5dd4144b5c3d14fc0d1e1ed42e039ff706568a490925f1cafc94ff5f70ae7879827c82dfbc85
|
||||
SHA512 (xpdf-japanese-2020-dec-22-NOCMAP.tar.gz) = aff90d0c8f26e1dffd2b178c5ee676cfa520086d28dd56af65ef3fcd016c2770361edeb35974f45328cd62d5cd7dff0ac719e38ee2594bef07e062869289a647
|
||||
SHA512 (xpdf-chinese-simplified-2023-dec-05-NOCMAP.tar.gz) = 292a819cca4d6095b6835b30241abbbbb07354adc839c9a49b90f2dd9deb1fc7d8727a9bade3cab88da8e903e00199ecf8672727ae7310cc15e1ad8c282d218b
|
||||
SHA512 (xpdf-korean-2023-dec-05-NOCMAP.tar.gz) = 3ca81eaee279122a8054fc26f16d85c668d0571a1b249a410346196c2b61081bcdfec61c140a7334a921d80738e908b507ac47a301f3aae37b3050c8e8b77f29
|
||||
SHA512 (xpdf-thai.tar.gz) = c738ef97c57630feb4d1bae3df36ba02118f73e770caeef4bd3256740b9aadb94ec07b993a01a6abc9ba711d6dc2900f90eb7e1c7bbbf157f07160be1743d3f1
|
||||
SHA512 (xpdf-4.06.tar.gz) = ace2d2c006411ef40f3510fe34809e6ed5fd4a2367ac11a75e9d4795aa5054e72f12e307165d11a25b12609d33b279b9b99d9c072442e98308a77ad022bc8355
|
||||
SHA512 (xpdf-4.06.tar.gz.sig) = 2df5d491a2126c9f879896c623193cfb6e7b38da53a1eaac4060b77569d84b2d28a12e3a1285d31bb9a422f774f3d70238d47bfec388db1222fc041627da1ec7
|
||||
|
|
|
|||
|
|
@ -1,55 +1,57 @@
|
|||
--- xpdf-3.00/goo/gmem.h.me 2005-07-25 10:47:46.000000000 +0200
|
||||
+++ xpdf-3.00/goo/gmem.h 2005-07-25 10:49:55.000000000 +0200
|
||||
@@ -19,13 +19,13 @@
|
||||
* Same as malloc, but prints error message and exits if malloc()
|
||||
* returns NULL.
|
||||
*/
|
||||
-extern void *gmalloc(int size);
|
||||
+extern void *gmalloc(size_t size);
|
||||
|
||||
/*
|
||||
* Same as realloc, but prints error message and exits if realloc()
|
||||
* returns NULL. If <p> is NULL, calls malloc instead of realloc().
|
||||
*/
|
||||
-extern void *grealloc(void *p, int size);
|
||||
+extern void *grealloc(void *p, size_t size);
|
||||
|
||||
/*
|
||||
* Same as free, but checks for and ignores NULL pointers.
|
||||
--- xpdf-3.00/goo/gmem.c.me 2005-07-25 10:47:51.000000000 +0200
|
||||
+++ xpdf-3.00/goo/gmem.c 2005-07-25 10:49:30.000000000 +0200
|
||||
@@ -53,9 +53,9 @@
|
||||
diff -up xpdf-3.02/goo/gmem.cc.BAD xpdf-3.02/goo/gmem.cc
|
||||
--- xpdf-3.02/goo/gmem.cc.BAD 2007-08-01 17:20:00.000000000 -0500
|
||||
+++ xpdf-3.02/goo/gmem.cc 2007-08-01 17:22:04.000000000 -0500
|
||||
@@ -47,9 +47,9 @@ static int gMemInUse = 0;
|
||||
|
||||
#endif /* DEBUG_MEM */
|
||||
|
||||
-void *gmalloc(int size) {
|
||||
+void *gmalloc(size_t size) {
|
||||
-void *gmalloc(int size) GMEM_EXCEP {
|
||||
+void *gmalloc(size_t size) GMEM_EXCEP {
|
||||
#ifdef DEBUG_MEM
|
||||
- int size1;
|
||||
+ size_t size1;
|
||||
char *mem;
|
||||
GMemHdr *hdr;
|
||||
void *data;
|
||||
@@ -94,11 +94,11 @@
|
||||
@@ -106,11 +106,11 @@ void *gmalloc(int size) GMEM_EXCEP {
|
||||
#endif
|
||||
}
|
||||
|
||||
-void *grealloc(void *p, int size) {
|
||||
+void *grealloc(void *p, size_t size) {
|
||||
-void *grealloc(void *p, int size) GMEM_EXCEP {
|
||||
+void *grealloc(void *p, size_t size) GMEM_EXCEP {
|
||||
#ifdef DEBUG_MEM
|
||||
GMemHdr *hdr;
|
||||
void *q;
|
||||
- int oldSize;
|
||||
+ size_t oldSize;
|
||||
|
||||
if (size == 0) {
|
||||
if (p)
|
||||
@@ -137,7 +137,7 @@
|
||||
if (size <= 0) {
|
||||
if (p) {
|
||||
@@ -195,7 +195,7 @@ void *greallocn(void *p, int nObjs, int
|
||||
|
||||
void gfree(void *p) {
|
||||
#ifdef DEBUG_MEM
|
||||
- int size;
|
||||
+ size_t size;
|
||||
GMemHdr *hdr;
|
||||
GMemHdr *prevHdr, *q;
|
||||
int lst;
|
||||
unsigned long *trl, *clr;
|
||||
|
||||
diff -up xpdf-3.02/goo/gmem.h.BAD xpdf-3.02/goo/gmem.h
|
||||
--- xpdf-3.02/goo/gmem.h.BAD 2007-08-01 17:23:11.000000000 -0500
|
||||
+++ xpdf-3.02/goo/gmem.h 2007-08-01 17:23:45.000000000 -0500
|
||||
@@ -36,13 +36,13 @@ extern "C" {
|
||||
* Same as malloc, but prints error message and exits if malloc()
|
||||
* returns NULL.
|
||||
*/
|
||||
-extern void *gmalloc(int size) GMEM_EXCEP;
|
||||
+extern void *gmalloc(size_t size) GMEM_EXCEP;
|
||||
|
||||
/*
|
||||
* Same as realloc, but prints error message and exits if realloc()
|
||||
* returns NULL. If <p> is NULL, calls malloc instead of realloc().
|
||||
*/
|
||||
-extern void *grealloc(void *p, int size) GMEM_EXCEP;
|
||||
+extern void *grealloc(void *p, size_t size) GMEM_EXCEP;
|
||||
|
||||
/*
|
||||
* These are similar to gmalloc and grealloc, but take an object count
|
||||
|
|
|
|||
|
|
@ -85,29 +85,6 @@
|
|||
This is the default location for the system-wide configuration file.
|
||||
Depending on build options, it may be placed elsewhere.
|
||||
.TP
|
||||
--- xpdf-3.01/doc/sample-xpdfrc.orig 2005-08-17 00:34:30.000000000 -0500
|
||||
+++ xpdf-3.01/doc/sample-xpdfrc 2006-09-25 12:54:53.000000000 -0500
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
# Set the default PostScript file or command.
|
||||
|
||||
-#psFile "|lpr -Pmyprinter"
|
||||
+psFile "|lpr"
|
||||
|
||||
# Set the default PostScript paper size -- this can be letter, legal,
|
||||
# A4, or A3. You can also specify a paper size as width and height
|
||||
@@ -88,4 +88,11 @@
|
||||
# Set the command used to run a web browser when a URL hyperlink is
|
||||
# clicked.
|
||||
|
||||
+urlCommand "htmlview '%s'"
|
||||
#urlCommand "netscape -remote 'openURL(%s)'"
|
||||
+
|
||||
+# CJK
|
||||
+include /etc/xpdf/add-to-xpdfrc.japanese
|
||||
+include /etc/xpdf/add-to-xpdfrc.korean
|
||||
+include /etc/xpdf/add-to-xpdfrc.chinese-simplified
|
||||
+include /etc/xpdf/add-to-xpdfrc.chinese-traditional
|
||||
--- xpdf-3.01/doc/xpdf.1.orig 2005-08-17 00:34:30.000000000 -0500
|
||||
+++ xpdf-3.01/doc/xpdf.1 2006-09-25 12:54:53.000000000 -0500
|
||||
@@ -41,7 +41,7 @@ xpdf
|
||||
|
|
@ -256,3 +233,26 @@
|
|||
+nameToUnicode /usr/share/xpdf/cyrillic/Bulgarian.nameToUnicode
|
||||
+unicodeMap KOI8-R /usr/share/xpdf/cyrillic/KOI8-R.unicodeMap
|
||||
#----- end Cyrillic support package
|
||||
--- xpdf-3.03/doc/sample-xpdfrc.orig 2011-08-15 17:08:53.000000000 -0400
|
||||
+++ xpdf-3.03/doc/sample-xpdfrc 2011-08-22 13:41:14.405172432 -0400
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
# Set the default PostScript file or command.
|
||||
|
||||
-#psFile "|lpr -Pmyprinter"
|
||||
+psFile "|lpr"
|
||||
|
||||
# Set the default PostScript paper size -- this can be letter, legal,
|
||||
# A4, or A3. You can also specify a paper size as width and height
|
||||
@@ -89,4 +89,10 @@
|
||||
# clicked.
|
||||
|
||||
#launchCommand viewer-script
|
||||
-#urlCommand "netscape -remote 'openURL(%s)'"
|
||||
+urlCommand "xdg-open '%s'"
|
||||
+
|
||||
+# CJK
|
||||
+include /etc/xpdf/add-to-xpdfrc.japanese
|
||||
+include /etc/xpdf/add-to-xpdfrc.korean
|
||||
+include /etc/xpdf/add-to-xpdfrc.chinese-simplified
|
||||
+include /etc/xpdf/add-to-xpdfrc.chinese-traditional
|
||||
|
|
|
|||
26
xpdf-3.02-additionalzoom.patch
Normal file
26
xpdf-3.02-additionalzoom.patch
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
diff -up xpdf-3.02/xpdf/XPDFViewer.cc.BAD xpdf-3.02/xpdf/XPDFViewer.cc
|
||||
--- xpdf-3.02/xpdf/XPDFViewer.cc.BAD 2007-08-28 14:44:09.000000000 -0400
|
||||
+++ xpdf-3.02/xpdf/XPDFViewer.cc 2007-08-28 14:44:47.000000000 -0400
|
||||
@@ -140,6 +140,8 @@ struct ZoomMenuInfo {
|
||||
|
||||
static ZoomMenuInfo zoomMenuInfo[nZoomMenuItems] = {
|
||||
{ "400%", 400 },
|
||||
+ { "300%", 300 },
|
||||
+ { "250%", 250 },
|
||||
{ "200%", 200 },
|
||||
{ "150%", 150 },
|
||||
{ "125%", 125 },
|
||||
diff -up xpdf-3.02/xpdf/Stream.cc.BAD xpdf-3.02/xpdf/Stream.cc
|
||||
diff -up xpdf-3.02/xpdf/XPDFViewer.h.BAD xpdf-3.02/xpdf/XPDFViewer.h
|
||||
diff -up xpdf-3.02/xpdf/XPDFViewer.h.BAD xpdf-3.02/xpdf/XPDFViewer.h
|
||||
--- xpdf-3.02/xpdf/XPDFViewer.h.BAD 2007-08-28 16:46:48.000000000 -0400
|
||||
+++ xpdf-3.02/xpdf/XPDFViewer.h 2007-08-28 16:46:57.000000000 -0400
|
||||
@@ -41,7 +41,7 @@ class XPDFViewer;
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
// NB: this must match the defn of zoomMenuBtnInfo in XPDFViewer.cc
|
||||
-#define nZoomMenuItems 10
|
||||
+#define nZoomMenuItems 12
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
48
xpdf-3.02-crash.patch
Normal file
48
xpdf-3.02-crash.patch
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
diff -up xpdf-3.02/fofi/FoFiType1.cc.crash xpdf-3.02/fofi/FoFiType1.cc
|
||||
--- xpdf-3.02/fofi/FoFiType1.cc.crash 2007-02-27 17:05:51.000000000 -0500
|
||||
+++ xpdf-3.02/fofi/FoFiType1.cc 2009-02-11 11:31:04.000000000 -0500
|
||||
@@ -235,9 +235,14 @@ void FoFiType1::parse() {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
- if (strtok(buf, " \t") &&
|
||||
- (p = strtok(NULL, " \t\n\r")) && !strcmp(p, "def")) {
|
||||
- break;
|
||||
+ p = strtok(buf, " \t\n\r");
|
||||
+ if (p)
|
||||
+ {
|
||||
+ if (!strcmp(p, "def")) break;
|
||||
+ if (!strcmp(p, "readonly")) break;
|
||||
+ // the spec does not says this but i'm mantaining old xpdf behaviour that accepts "foo def" as end of the encoding array
|
||||
+ p = strtok(buf, " \t\n\r");
|
||||
+ if (p && !strcmp(p, "def")) break;
|
||||
}
|
||||
}
|
||||
}
|
||||
diff -up xpdf-3.02/splash/Splash.cc.crash xpdf-3.02/splash/Splash.cc
|
||||
--- xpdf-3.02/splash/Splash.cc.crash 2007-02-27 17:05:52.000000000 -0500
|
||||
+++ xpdf-3.02/splash/Splash.cc 2009-02-11 11:34:45.000000000 -0500
|
||||
@@ -1501,6 +1501,11 @@ SplashError Splash::fillWithPattern(Spla
|
||||
xPath->aaScale();
|
||||
}
|
||||
xPath->sort();
|
||||
+ if (!&xPath->segs[0])
|
||||
+ {
|
||||
+ delete xPath;
|
||||
+ return splashErrEmptyPath;
|
||||
+ }
|
||||
scanner = new SplashXPathScanner(xPath, eo);
|
||||
|
||||
// get the min and max x and y values
|
||||
@@ -1573,6 +1578,11 @@ SplashError Splash::xorFill(SplashPath *
|
||||
}
|
||||
xPath = new SplashXPath(path, state->matrix, state->flatness, gTrue);
|
||||
xPath->sort();
|
||||
+ if (!&xPath->segs[0])
|
||||
+ {
|
||||
+ delete xPath;
|
||||
+ return splashErrEmptyPath;
|
||||
+ }
|
||||
scanner = new SplashXPathScanner(xPath, eo);
|
||||
|
||||
// get the min and max x and y values
|
||||
32
xpdf-3.02-fontlist.patch
Normal file
32
xpdf-3.02-fontlist.patch
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
--- xpdf-3.02/xpdf/XPDFApp.cc.fntlist 2007-02-27 15:05:52.000000000 -0700
|
||||
+++ xpdf-3.02/xpdf/XPDFApp.cc 2007-08-02 20:39:26.000000000 -0600
|
||||
@@ -35,9 +35,9 @@
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
static String fallbackResources[] = {
|
||||
- "*.zoomComboBox*fontList: -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1",
|
||||
- "*XmTextField.fontList: -*-courier-medium-r-normal--12-*-*-*-*-*-iso8859-1",
|
||||
- "*.fontList: -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1",
|
||||
+ "*.zoomComboBox*fontList: -*-helvetica-medium-r-normal-*-12-*-*-*-*-*-iso8859-1",
|
||||
+ "*XmTextField.fontList: -*-courier-medium-r-*-12-*-*-*-*-*-iso8859-1",
|
||||
+ "*.fontList: -*-helvetica-medium-r-normal-*-12-*-*-*-*-*-iso8859-1",
|
||||
"*XmTextField.translations: #override\\n"
|
||||
" Ctrl<Key>a:beginning-of-line()\\n"
|
||||
" Ctrl<Key>b:backward-character()\\n"
|
||||
--- xpdf-3.02/xpdf/XPDFViewer.cc.fntlist 2007-08-02 20:25:21.000000000 -0600
|
||||
+++ xpdf-3.02/xpdf/XPDFViewer.cc 2007-08-02 20:38:03.000000000 -0600
|
||||
@@ -2789,11 +2789,11 @@ void XPDFViewer::initAboutDialog() {
|
||||
|
||||
//----- fonts
|
||||
aboutBigFont =
|
||||
- createFontList("-*-times-bold-i-normal--20-*-*-*-*-*-iso8859-1");
|
||||
+ createFontList("-*-times-bold-i-normal-*-20-*-*-*-*-*-iso8859-1");
|
||||
aboutVersionFont =
|
||||
- createFontList("-*-times-medium-r-normal--14-*-*-*-*-*-iso8859-1");
|
||||
+ createFontList("-*-times-medium-r-normal-*-14-*-*-*-*-*-iso8859-1");
|
||||
aboutFixedFont =
|
||||
- createFontList("-*-courier-medium-r-normal--12-*-*-*-*-*-iso8859-1");
|
||||
+ createFontList("-*-courier-medium-r-*-12-*-*-*-*-*-iso8859-1");
|
||||
|
||||
//----- heading
|
||||
n = 0;
|
||||
51
xpdf-3.02-mousebuttons.patch
Normal file
51
xpdf-3.02-mousebuttons.patch
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
diff -up xpdf-3.02/xpdf/GlobalParams.cc.BAD xpdf-3.02/xpdf/GlobalParams.cc
|
||||
--- xpdf-3.02/xpdf/GlobalParams.cc.BAD 2007-08-28 14:30:13.000000000 -0400
|
||||
+++ xpdf-3.02/xpdf/GlobalParams.cc 2007-08-28 14:30:38.000000000 -0400
|
||||
@@ -1574,10 +1574,10 @@ GBool GlobalParams::parseKey(GString *mo
|
||||
!p0[3]) {
|
||||
*code = xpdfKeyCodeF1 + 10 * (p0[1] - '0') + (p0[2] - '0') - 1;
|
||||
} else if (!strncmp(p0, "mousePress", 10) &&
|
||||
- p0[10] >= '1' && p0[10] <= '7' && !p0[11]) {
|
||||
+ p0[10] >= '1' && p0[10] <= '9' && !p0[11]) {
|
||||
*code = xpdfKeyCodeMousePress1 + (p0[10] - '1');
|
||||
} else if (!strncmp(p0, "mouseRelease", 12) &&
|
||||
- p0[12] >= '1' && p0[12] <= '7' && !p0[13]) {
|
||||
+ p0[12] >= '1' && p0[12] <= '9' && !p0[13]) {
|
||||
*code = xpdfKeyCodeMouseRelease1 + (p0[12] - '1');
|
||||
} else if (*p0 >= 0x20 && *p0 <= 0x7e && !p0[1]) {
|
||||
*code = (int)*p0;
|
||||
diff -up xpdf-3.02/xpdf/GlobalParams.h.BAD xpdf-3.02/xpdf/GlobalParams.h
|
||||
--- xpdf-3.02/xpdf/GlobalParams.h.BAD 2007-08-28 14:30:44.000000000 -0400
|
||||
+++ xpdf-3.02/xpdf/GlobalParams.h 2007-08-28 14:31:12.000000000 -0400
|
||||
@@ -164,6 +164,8 @@ public:
|
||||
#define xpdfKeyCodeMousePress5 0x2005
|
||||
#define xpdfKeyCodeMousePress6 0x2006
|
||||
#define xpdfKeyCodeMousePress7 0x2007
|
||||
+#define xpdfKeyCodeMousePress8 0x2008
|
||||
+#define xpdfKeyCodeMousePress9 0x2009
|
||||
#define xpdfKeyCodeMouseRelease1 0x2101
|
||||
#define xpdfKeyCodeMouseRelease2 0x2102
|
||||
#define xpdfKeyCodeMouseRelease3 0x2103
|
||||
@@ -171,6 +173,8 @@ public:
|
||||
#define xpdfKeyCodeMouseRelease5 0x2105
|
||||
#define xpdfKeyCodeMouseRelease6 0x2106
|
||||
#define xpdfKeyCodeMouseRelease7 0x2107
|
||||
+#define xpdfKeyCodeMouseRelease8 0x2108
|
||||
+#define xpdfKeyCodeMouseRelease9 0x2109
|
||||
#define xpdfKeyModNone 0
|
||||
#define xpdfKeyModShift (1 << 0)
|
||||
#define xpdfKeyModCtrl (1 << 1)
|
||||
diff -up xpdf-3.02/doc/xpdfrc.5.BAD xpdf-3.02/doc/xpdfrc.5
|
||||
--- xpdf-3.02/doc/xpdfrc.5.BAD 2007-08-28 14:31:25.000000000 -0400
|
||||
+++ xpdf-3.02/doc/xpdfrc.5 2007-08-28 14:31:35.000000000 -0400
|
||||
@@ -483,8 +483,8 @@ can be a regular ASCII character, or any
|
||||
pgdn
|
||||
left / right / up / down (arrow keys)
|
||||
f1 .. f35 (function keys)
|
||||
- mousePress1 .. mousePress7 (mouse buttons)
|
||||
- mouseRelease1 .. mouseRelease7 (mouse buttons)
|
||||
+ mousePress1 .. mousePress9 (mouse buttons)
|
||||
+ mouseRelease1 .. mouseRelease9 (mouse buttons)
|
||||
|
||||
.fi
|
||||
.I Context
|
||||
18
xpdf-3.02-mousebuttons_view.patch
Normal file
18
xpdf-3.02-mousebuttons_view.patch
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
--- xpdf-3.02/xpdf/XPDFViewer.cc~ 2009-02-02 01:58:55.000000000 -0700
|
||||
+++ xpdf-3.02/xpdf/XPDFViewer.cc 2009-02-02 02:27:04.000000000 -0700
|
||||
@@ -592,13 +592,13 @@ void XPDFViewer::mouseCbk(void *data, XE
|
||||
int i;
|
||||
|
||||
if (event->type == ButtonPress) {
|
||||
- if (event->xbutton.button >= 1 && event->xbutton.button <= 7) {
|
||||
+ if (event->xbutton.button >= 1 && event->xbutton.button <= 9) {
|
||||
keyCode = xpdfKeyCodeMousePress1 + event->xbutton.button - 1;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
} else if (event->type == ButtonRelease) {
|
||||
- if (event->xbutton.button >= 1 && event->xbutton.button <= 7) {
|
||||
+ if (event->xbutton.button >= 1 && event->xbutton.button <= 9) {
|
||||
keyCode = xpdfKeyCodeMouseRelease1 + event->xbutton.button - 1;
|
||||
} else {
|
||||
return;
|
||||
12
xpdf-3.02-x86_64-fix.patch
Normal file
12
xpdf-3.02-x86_64-fix.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -up xpdf-3.02/xpdf/Stream.cc.BAD xpdf-3.02/xpdf/Stream.cc
|
||||
--- xpdf-3.02/xpdf/Stream.cc.BAD 2007-08-21 16:20:40.000000000 -0400
|
||||
+++ xpdf-3.02/xpdf/Stream.cc 2007-08-21 16:20:44.000000000 -0400
|
||||
@@ -4451,7 +4451,7 @@ void ASCII85Encoder::reset() {
|
||||
}
|
||||
|
||||
GBool ASCII85Encoder::fillBuf() {
|
||||
- Gulong t;
|
||||
+ Guint t;
|
||||
char buf1[5];
|
||||
int c0, c1, c2, c3;
|
||||
int n, i;
|
||||
33
xpdf-3.02pl1.patch
Normal file
33
xpdf-3.02pl1.patch
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
*** xpdf-3.02.orig/xpdf/Stream.cc Tue Feb 27 14:05:52 2007
|
||||
--- xpdf-3.02/xpdf/Stream.cc Thu Jul 26 14:44:43 2007
|
||||
***************
|
||||
*** 410,424 ****
|
||||
ok = gFalse;
|
||||
|
||||
nVals = width * nComps;
|
||||
- if (width <= 0 || nComps <= 0 || nBits <= 0 ||
|
||||
- nComps >= INT_MAX / nBits ||
|
||||
- width >= INT_MAX / nComps / nBits ||
|
||||
- nVals * nBits + 7 < 0) {
|
||||
- return;
|
||||
- }
|
||||
pixBytes = (nComps * nBits + 7) >> 3;
|
||||
rowBytes = ((nVals * nBits + 7) >> 3) + pixBytes;
|
||||
! if (rowBytes <= 0) {
|
||||
return;
|
||||
}
|
||||
predLine = (Guchar *)gmalloc(rowBytes);
|
||||
--- 410,422 ----
|
||||
ok = gFalse;
|
||||
|
||||
nVals = width * nComps;
|
||||
pixBytes = (nComps * nBits + 7) >> 3;
|
||||
rowBytes = ((nVals * nBits + 7) >> 3) + pixBytes;
|
||||
! if (width <= 0 || nComps <= 0 || nBits <= 0 ||
|
||||
! nComps > gfxColorMaxComps ||
|
||||
! nBits > 16 ||
|
||||
! width >= INT_MAX / nComps || // check for overflow in nVals
|
||||
! nVals >= (INT_MAX - 7) / nBits) { // check for overflow in rowBytes
|
||||
return;
|
||||
}
|
||||
predLine = (Guchar *)gmalloc(rowBytes);
|
||||
823
xpdf-3.02pl2.patch
Normal file
823
xpdf-3.02pl2.patch
Normal file
|
|
@ -0,0 +1,823 @@
|
|||
diff -c -r xpdf-3.02pl1.orig/xpdf/Stream.cc xpdf-3.02/xpdf/Stream.cc
|
||||
*** xpdf-3.02pl1.orig/xpdf/Stream.cc Thu Oct 25 15:47:38 2007
|
||||
--- xpdf-3.02/xpdf/Stream.cc Thu Oct 25 15:48:19 2007
|
||||
***************
|
||||
*** 1243,1265 ****
|
||||
columns = columnsA;
|
||||
if (columns < 1) {
|
||||
columns = 1;
|
||||
! }
|
||||
! if (columns + 4 <= 0) {
|
||||
! columns = INT_MAX - 4;
|
||||
}
|
||||
rows = rowsA;
|
||||
endOfBlock = endOfBlockA;
|
||||
black = blackA;
|
||||
! refLine = (short *)gmallocn(columns + 3, sizeof(short));
|
||||
! codingLine = (short *)gmallocn(columns + 2, sizeof(short));
|
||||
|
||||
eof = gFalse;
|
||||
row = 0;
|
||||
nextLine2D = encoding < 0;
|
||||
inputBits = 0;
|
||||
! codingLine[0] = 0;
|
||||
! codingLine[1] = refLine[2] = columns;
|
||||
! a0 = 1;
|
||||
|
||||
buf = EOF;
|
||||
}
|
||||
--- 1243,1268 ----
|
||||
columns = columnsA;
|
||||
if (columns < 1) {
|
||||
columns = 1;
|
||||
! } else if (columns > INT_MAX - 2) {
|
||||
! columns = INT_MAX - 2;
|
||||
}
|
||||
rows = rowsA;
|
||||
endOfBlock = endOfBlockA;
|
||||
black = blackA;
|
||||
! // 0 <= codingLine[0] < codingLine[1] < ... < codingLine[n] = columns
|
||||
! // ---> max codingLine size = columns + 1
|
||||
! // refLine has one extra guard entry at the end
|
||||
! // ---> max refLine size = columns + 2
|
||||
! codingLine = (int *)gmallocn(columns + 1, sizeof(int));
|
||||
! refLine = (int *)gmallocn(columns + 2, sizeof(int));
|
||||
|
||||
eof = gFalse;
|
||||
row = 0;
|
||||
nextLine2D = encoding < 0;
|
||||
inputBits = 0;
|
||||
! codingLine[0] = columns;
|
||||
! a0i = 0;
|
||||
! outputBits = 0;
|
||||
|
||||
buf = EOF;
|
||||
}
|
||||
***************
|
||||
*** 1278,1286 ****
|
||||
row = 0;
|
||||
nextLine2D = encoding < 0;
|
||||
inputBits = 0;
|
||||
! codingLine[0] = 0;
|
||||
! codingLine[1] = columns;
|
||||
! a0 = 1;
|
||||
buf = EOF;
|
||||
|
||||
// skip any initial zero bits and end-of-line marker, and get the 2D
|
||||
--- 1281,1289 ----
|
||||
row = 0;
|
||||
nextLine2D = encoding < 0;
|
||||
inputBits = 0;
|
||||
! codingLine[0] = columns;
|
||||
! a0i = 0;
|
||||
! outputBits = 0;
|
||||
buf = EOF;
|
||||
|
||||
// skip any initial zero bits and end-of-line marker, and get the 2D
|
||||
***************
|
||||
*** 1297,1507 ****
|
||||
}
|
||||
}
|
||||
|
||||
int CCITTFaxStream::lookChar() {
|
||||
short code1, code2, code3;
|
||||
! int a0New;
|
||||
! GBool err, gotEOL;
|
||||
! int ret;
|
||||
! int bits, i;
|
||||
|
||||
! // if at eof just return EOF
|
||||
! if (eof && codingLine[a0] >= columns) {
|
||||
! return EOF;
|
||||
}
|
||||
|
||||
// read the next row
|
||||
! err = gFalse;
|
||||
! if (codingLine[a0] >= columns) {
|
||||
|
||||
// 2-D encoding
|
||||
if (nextLine2D) {
|
||||
- // state:
|
||||
- // a0New = current position in coding line (0 <= a0New <= columns)
|
||||
- // codingLine[a0] = last change in coding line
|
||||
- // (black-to-white if a0 is even,
|
||||
- // white-to-black if a0 is odd)
|
||||
- // refLine[b1] = next change in reference line of opposite color
|
||||
- // to a0
|
||||
- // invariants:
|
||||
- // 0 <= codingLine[a0] <= a0New
|
||||
- // <= refLine[b1] <= refLine[b1+1] <= columns
|
||||
- // 0 <= a0 <= columns+1
|
||||
- // refLine[0] = 0
|
||||
- // refLine[n] = refLine[n+1] = columns
|
||||
- // -- for some 1 <= n <= columns+1
|
||||
- // end condition:
|
||||
- // 0 = codingLine[0] <= codingLine[1] < codingLine[2] < ...
|
||||
- // < codingLine[n-1] < codingLine[n] = columns
|
||||
- // -- where 1 <= n <= columns+1
|
||||
for (i = 0; codingLine[i] < columns; ++i) {
|
||||
refLine[i] = codingLine[i];
|
||||
}
|
||||
! refLine[i] = refLine[i + 1] = columns;
|
||||
! b1 = 1;
|
||||
! a0New = codingLine[a0 = 0] = 0;
|
||||
! do {
|
||||
code1 = getTwoDimCode();
|
||||
switch (code1) {
|
||||
case twoDimPass:
|
||||
! if (refLine[b1] < columns) {
|
||||
! a0New = refLine[b1 + 1];
|
||||
! b1 += 2;
|
||||
}
|
||||
break;
|
||||
case twoDimHoriz:
|
||||
! if ((a0 & 1) == 0) {
|
||||
! code1 = code2 = 0;
|
||||
do {
|
||||
! code1 += code3 = getWhiteCode();
|
||||
} while (code3 >= 64);
|
||||
do {
|
||||
! code2 += code3 = getBlackCode();
|
||||
} while (code3 >= 64);
|
||||
} else {
|
||||
- code1 = code2 = 0;
|
||||
do {
|
||||
! code1 += code3 = getBlackCode();
|
||||
} while (code3 >= 64);
|
||||
do {
|
||||
! code2 += code3 = getWhiteCode();
|
||||
} while (code3 >= 64);
|
||||
}
|
||||
! if (code1 > 0 || code2 > 0) {
|
||||
! if (a0New + code1 <= columns) {
|
||||
! codingLine[a0 + 1] = a0New + code1;
|
||||
! } else {
|
||||
! codingLine[a0 + 1] = columns;
|
||||
! }
|
||||
! ++a0;
|
||||
! if (codingLine[a0] + code2 <= columns) {
|
||||
! codingLine[a0 + 1] = codingLine[a0] + code2;
|
||||
! } else {
|
||||
! codingLine[a0 + 1] = columns;
|
||||
! }
|
||||
! ++a0;
|
||||
! a0New = codingLine[a0];
|
||||
! while (refLine[b1] <= a0New && refLine[b1] < columns) {
|
||||
! b1 += 2;
|
||||
}
|
||||
}
|
||||
break;
|
||||
! case twoDimVert0:
|
||||
! if (refLine[b1] < columns) {
|
||||
! a0New = codingLine[++a0] = refLine[b1];
|
||||
! ++b1;
|
||||
! while (refLine[b1] <= a0New && refLine[b1] < columns) {
|
||||
! b1 += 2;
|
||||
}
|
||||
- } else {
|
||||
- a0New = codingLine[++a0] = columns;
|
||||
}
|
||||
break;
|
||||
case twoDimVertR1:
|
||||
! if (refLine[b1] + 1 < columns) {
|
||||
! a0New = codingLine[++a0] = refLine[b1] + 1;
|
||||
! ++b1;
|
||||
! while (refLine[b1] <= a0New && refLine[b1] < columns) {
|
||||
! b1 += 2;
|
||||
}
|
||||
- } else {
|
||||
- a0New = codingLine[++a0] = columns;
|
||||
}
|
||||
break;
|
||||
! case twoDimVertL1:
|
||||
! if (refLine[b1] - 1 > a0New || (a0 == 0 && refLine[b1] == 1)) {
|
||||
! a0New = codingLine[++a0] = refLine[b1] - 1;
|
||||
! --b1;
|
||||
! while (refLine[b1] <= a0New && refLine[b1] < columns) {
|
||||
! b1 += 2;
|
||||
}
|
||||
}
|
||||
break;
|
||||
! case twoDimVertR2:
|
||||
! if (refLine[b1] + 2 < columns) {
|
||||
! a0New = codingLine[++a0] = refLine[b1] + 2;
|
||||
! ++b1;
|
||||
! while (refLine[b1] <= a0New && refLine[b1] < columns) {
|
||||
! b1 += 2;
|
||||
}
|
||||
- } else {
|
||||
- a0New = codingLine[++a0] = columns;
|
||||
}
|
||||
break;
|
||||
case twoDimVertL2:
|
||||
! if (refLine[b1] - 2 > a0New || (a0 == 0 && refLine[b1] == 2)) {
|
||||
! a0New = codingLine[++a0] = refLine[b1] - 2;
|
||||
! --b1;
|
||||
! while (refLine[b1] <= a0New && refLine[b1] < columns) {
|
||||
! b1 += 2;
|
||||
}
|
||||
! }
|
||||
! break;
|
||||
! case twoDimVertR3:
|
||||
! if (refLine[b1] + 3 < columns) {
|
||||
! a0New = codingLine[++a0] = refLine[b1] + 3;
|
||||
! ++b1;
|
||||
! while (refLine[b1] <= a0New && refLine[b1] < columns) {
|
||||
! b1 += 2;
|
||||
}
|
||||
- } else {
|
||||
- a0New = codingLine[++a0] = columns;
|
||||
}
|
||||
break;
|
||||
! case twoDimVertL3:
|
||||
! if (refLine[b1] - 3 > a0New || (a0 == 0 && refLine[b1] == 3)) {
|
||||
! a0New = codingLine[++a0] = refLine[b1] - 3;
|
||||
! --b1;
|
||||
! while (refLine[b1] <= a0New && refLine[b1] < columns) {
|
||||
! b1 += 2;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case EOF:
|
||||
eof = gTrue;
|
||||
! codingLine[a0 = 0] = columns;
|
||||
! return EOF;
|
||||
default:
|
||||
error(getPos(), "Bad 2D code %04x in CCITTFax stream", code1);
|
||||
err = gTrue;
|
||||
break;
|
||||
}
|
||||
! } while (codingLine[a0] < columns);
|
||||
|
||||
// 1-D encoding
|
||||
} else {
|
||||
! codingLine[a0 = 0] = 0;
|
||||
! while (1) {
|
||||
code1 = 0;
|
||||
! do {
|
||||
! code1 += code3 = getWhiteCode();
|
||||
! } while (code3 >= 64);
|
||||
! codingLine[a0+1] = codingLine[a0] + code1;
|
||||
! ++a0;
|
||||
! if (codingLine[a0] >= columns) {
|
||||
! break;
|
||||
! }
|
||||
! code2 = 0;
|
||||
! do {
|
||||
! code2 += code3 = getBlackCode();
|
||||
! } while (code3 >= 64);
|
||||
! codingLine[a0+1] = codingLine[a0] + code2;
|
||||
! ++a0;
|
||||
! if (codingLine[a0] >= columns) {
|
||||
! break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- if (codingLine[a0] != columns) {
|
||||
- error(getPos(), "CCITTFax row is wrong length (%d)", codingLine[a0]);
|
||||
- // force the row to be the correct length
|
||||
- while (codingLine[a0] > columns) {
|
||||
- --a0;
|
||||
- }
|
||||
- codingLine[++a0] = columns;
|
||||
- err = gTrue;
|
||||
- }
|
||||
-
|
||||
// byte-align the row
|
||||
if (byteAlign) {
|
||||
inputBits &= ~7;
|
||||
--- 1300,1529 ----
|
||||
}
|
||||
}
|
||||
|
||||
+ inline void CCITTFaxStream::addPixels(int a1, int blackPixels) {
|
||||
+ if (a1 > codingLine[a0i]) {
|
||||
+ if (a1 > columns) {
|
||||
+ error(getPos(), "CCITTFax row is wrong length (%d)", a1);
|
||||
+ err = gTrue;
|
||||
+ a1 = columns;
|
||||
+ }
|
||||
+ if ((a0i & 1) ^ blackPixels) {
|
||||
+ ++a0i;
|
||||
+ }
|
||||
+ codingLine[a0i] = a1;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ inline void CCITTFaxStream::addPixelsNeg(int a1, int blackPixels) {
|
||||
+ if (a1 > codingLine[a0i]) {
|
||||
+ if (a1 > columns) {
|
||||
+ error(getPos(), "CCITTFax row is wrong length (%d)", a1);
|
||||
+ err = gTrue;
|
||||
+ a1 = columns;
|
||||
+ }
|
||||
+ if ((a0i & 1) ^ blackPixels) {
|
||||
+ ++a0i;
|
||||
+ }
|
||||
+ codingLine[a0i] = a1;
|
||||
+ } else if (a1 < codingLine[a0i]) {
|
||||
+ if (a1 < 0) {
|
||||
+ error(getPos(), "Invalid CCITTFax code");
|
||||
+ err = gTrue;
|
||||
+ a1 = 0;
|
||||
+ }
|
||||
+ while (a0i > 0 && a1 <= codingLine[a0i - 1]) {
|
||||
+ --a0i;
|
||||
+ }
|
||||
+ codingLine[a0i] = a1;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
int CCITTFaxStream::lookChar() {
|
||||
short code1, code2, code3;
|
||||
! int b1i, blackPixels, i, bits;
|
||||
! GBool gotEOL;
|
||||
|
||||
! if (buf != EOF) {
|
||||
! return buf;
|
||||
}
|
||||
|
||||
// read the next row
|
||||
! if (outputBits == 0) {
|
||||
!
|
||||
! // if at eof just return EOF
|
||||
! if (eof) {
|
||||
! return EOF;
|
||||
! }
|
||||
!
|
||||
! err = gFalse;
|
||||
|
||||
// 2-D encoding
|
||||
if (nextLine2D) {
|
||||
for (i = 0; codingLine[i] < columns; ++i) {
|
||||
refLine[i] = codingLine[i];
|
||||
}
|
||||
! refLine[i++] = columns;
|
||||
! refLine[i] = columns;
|
||||
! codingLine[0] = 0;
|
||||
! a0i = 0;
|
||||
! b1i = 0;
|
||||
! blackPixels = 0;
|
||||
! // invariant:
|
||||
! // refLine[b1i-1] <= codingLine[a0i] < refLine[b1i] < refLine[b1i+1]
|
||||
! // <= columns
|
||||
! // exception at left edge:
|
||||
! // codingLine[a0i = 0] = refLine[b1i = 0] = 0 is possible
|
||||
! // exception at right edge:
|
||||
! // refLine[b1i] = refLine[b1i+1] = columns is possible
|
||||
! while (codingLine[a0i] < columns) {
|
||||
code1 = getTwoDimCode();
|
||||
switch (code1) {
|
||||
case twoDimPass:
|
||||
! addPixels(refLine[b1i + 1], blackPixels);
|
||||
! if (refLine[b1i + 1] < columns) {
|
||||
! b1i += 2;
|
||||
}
|
||||
break;
|
||||
case twoDimHoriz:
|
||||
! code1 = code2 = 0;
|
||||
! if (blackPixels) {
|
||||
do {
|
||||
! code1 += code3 = getBlackCode();
|
||||
} while (code3 >= 64);
|
||||
do {
|
||||
! code2 += code3 = getWhiteCode();
|
||||
} while (code3 >= 64);
|
||||
} else {
|
||||
do {
|
||||
! code1 += code3 = getWhiteCode();
|
||||
} while (code3 >= 64);
|
||||
do {
|
||||
! code2 += code3 = getBlackCode();
|
||||
} while (code3 >= 64);
|
||||
}
|
||||
! addPixels(codingLine[a0i] + code1, blackPixels);
|
||||
! if (codingLine[a0i] < columns) {
|
||||
! addPixels(codingLine[a0i] + code2, blackPixels ^ 1);
|
||||
! }
|
||||
! while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) {
|
||||
! b1i += 2;
|
||||
! }
|
||||
! break;
|
||||
! case twoDimVertR3:
|
||||
! addPixels(refLine[b1i] + 3, blackPixels);
|
||||
! blackPixels ^= 1;
|
||||
! if (codingLine[a0i] < columns) {
|
||||
! ++b1i;
|
||||
! while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) {
|
||||
! b1i += 2;
|
||||
}
|
||||
}
|
||||
break;
|
||||
! case twoDimVertR2:
|
||||
! addPixels(refLine[b1i] + 2, blackPixels);
|
||||
! blackPixels ^= 1;
|
||||
! if (codingLine[a0i] < columns) {
|
||||
! ++b1i;
|
||||
! while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) {
|
||||
! b1i += 2;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case twoDimVertR1:
|
||||
! addPixels(refLine[b1i] + 1, blackPixels);
|
||||
! blackPixels ^= 1;
|
||||
! if (codingLine[a0i] < columns) {
|
||||
! ++b1i;
|
||||
! while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) {
|
||||
! b1i += 2;
|
||||
}
|
||||
}
|
||||
break;
|
||||
! case twoDimVert0:
|
||||
! addPixels(refLine[b1i], blackPixels);
|
||||
! blackPixels ^= 1;
|
||||
! if (codingLine[a0i] < columns) {
|
||||
! ++b1i;
|
||||
! while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) {
|
||||
! b1i += 2;
|
||||
}
|
||||
}
|
||||
break;
|
||||
! case twoDimVertL3:
|
||||
! addPixelsNeg(refLine[b1i] - 3, blackPixels);
|
||||
! blackPixels ^= 1;
|
||||
! if (codingLine[a0i] < columns) {
|
||||
! if (b1i > 0) {
|
||||
! --b1i;
|
||||
! } else {
|
||||
! ++b1i;
|
||||
! }
|
||||
! while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) {
|
||||
! b1i += 2;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case twoDimVertL2:
|
||||
! addPixelsNeg(refLine[b1i] - 2, blackPixels);
|
||||
! blackPixels ^= 1;
|
||||
! if (codingLine[a0i] < columns) {
|
||||
! if (b1i > 0) {
|
||||
! --b1i;
|
||||
! } else {
|
||||
! ++b1i;
|
||||
}
|
||||
! while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) {
|
||||
! b1i += 2;
|
||||
}
|
||||
}
|
||||
break;
|
||||
! case twoDimVertL1:
|
||||
! addPixelsNeg(refLine[b1i] - 1, blackPixels);
|
||||
! blackPixels ^= 1;
|
||||
! if (codingLine[a0i] < columns) {
|
||||
! if (b1i > 0) {
|
||||
! --b1i;
|
||||
! } else {
|
||||
! ++b1i;
|
||||
! }
|
||||
! while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) {
|
||||
! b1i += 2;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case EOF:
|
||||
+ addPixels(columns, 0);
|
||||
eof = gTrue;
|
||||
! break;
|
||||
default:
|
||||
error(getPos(), "Bad 2D code %04x in CCITTFax stream", code1);
|
||||
+ addPixels(columns, 0);
|
||||
err = gTrue;
|
||||
break;
|
||||
}
|
||||
! }
|
||||
|
||||
// 1-D encoding
|
||||
} else {
|
||||
! codingLine[0] = 0;
|
||||
! a0i = 0;
|
||||
! blackPixels = 0;
|
||||
! while (codingLine[a0i] < columns) {
|
||||
code1 = 0;
|
||||
! if (blackPixels) {
|
||||
! do {
|
||||
! code1 += code3 = getBlackCode();
|
||||
! } while (code3 >= 64);
|
||||
! } else {
|
||||
! do {
|
||||
! code1 += code3 = getWhiteCode();
|
||||
! } while (code3 >= 64);
|
||||
}
|
||||
+ addPixels(codingLine[a0i] + code1, blackPixels);
|
||||
+ blackPixels ^= 1;
|
||||
}
|
||||
}
|
||||
|
||||
// byte-align the row
|
||||
if (byteAlign) {
|
||||
inputBits &= ~7;
|
||||
***************
|
||||
*** 1560,1573 ****
|
||||
// this if we know the stream contains end-of-line markers because
|
||||
// the "just plow on" technique tends to work better otherwise
|
||||
} else if (err && endOfLine) {
|
||||
! do {
|
||||
if (code1 == EOF) {
|
||||
eof = gTrue;
|
||||
return EOF;
|
||||
}
|
||||
eatBits(1);
|
||||
! code1 = lookBits(13);
|
||||
! } while ((code1 >> 1) != 0x001);
|
||||
eatBits(12);
|
||||
if (encoding > 0) {
|
||||
eatBits(1);
|
||||
--- 1582,1598 ----
|
||||
// this if we know the stream contains end-of-line markers because
|
||||
// the "just plow on" technique tends to work better otherwise
|
||||
} else if (err && endOfLine) {
|
||||
! while (1) {
|
||||
! code1 = lookBits(13);
|
||||
if (code1 == EOF) {
|
||||
eof = gTrue;
|
||||
return EOF;
|
||||
}
|
||||
+ if ((code1 >> 1) == 0x001) {
|
||||
+ break;
|
||||
+ }
|
||||
eatBits(1);
|
||||
! }
|
||||
eatBits(12);
|
||||
if (encoding > 0) {
|
||||
eatBits(1);
|
||||
***************
|
||||
*** 1575,1585 ****
|
||||
}
|
||||
}
|
||||
|
||||
! a0 = 0;
|
||||
! outputBits = codingLine[1] - codingLine[0];
|
||||
! if (outputBits == 0) {
|
||||
! a0 = 1;
|
||||
! outputBits = codingLine[2] - codingLine[1];
|
||||
}
|
||||
|
||||
++row;
|
||||
--- 1600,1610 ----
|
||||
}
|
||||
}
|
||||
|
||||
! // set up for output
|
||||
! if (codingLine[0] > 0) {
|
||||
! outputBits = codingLine[a0i = 0];
|
||||
! } else {
|
||||
! outputBits = codingLine[a0i = 1];
|
||||
}
|
||||
|
||||
++row;
|
||||
***************
|
||||
*** 1587,1625 ****
|
||||
|
||||
// get a byte
|
||||
if (outputBits >= 8) {
|
||||
! ret = ((a0 & 1) == 0) ? 0xff : 0x00;
|
||||
! if ((outputBits -= 8) == 0) {
|
||||
! ++a0;
|
||||
! if (codingLine[a0] < columns) {
|
||||
! outputBits = codingLine[a0 + 1] - codingLine[a0];
|
||||
! }
|
||||
}
|
||||
} else {
|
||||
bits = 8;
|
||||
! ret = 0;
|
||||
do {
|
||||
if (outputBits > bits) {
|
||||
! i = bits;
|
||||
! bits = 0;
|
||||
! if ((a0 & 1) == 0) {
|
||||
! ret |= 0xff >> (8 - i);
|
||||
}
|
||||
! outputBits -= i;
|
||||
} else {
|
||||
! i = outputBits;
|
||||
! bits -= outputBits;
|
||||
! if ((a0 & 1) == 0) {
|
||||
! ret |= (0xff >> (8 - i)) << bits;
|
||||
}
|
||||
outputBits = 0;
|
||||
! ++a0;
|
||||
! if (codingLine[a0] < columns) {
|
||||
! outputBits = codingLine[a0 + 1] - codingLine[a0];
|
||||
}
|
||||
}
|
||||
! } while (bits > 0 && codingLine[a0] < columns);
|
||||
}
|
||||
- buf = black ? (ret ^ 0xff) : ret;
|
||||
return buf;
|
||||
}
|
||||
|
||||
--- 1612,1654 ----
|
||||
|
||||
// get a byte
|
||||
if (outputBits >= 8) {
|
||||
! buf = (a0i & 1) ? 0x00 : 0xff;
|
||||
! outputBits -= 8;
|
||||
! if (outputBits == 0 && codingLine[a0i] < columns) {
|
||||
! ++a0i;
|
||||
! outputBits = codingLine[a0i] - codingLine[a0i - 1];
|
||||
}
|
||||
} else {
|
||||
bits = 8;
|
||||
! buf = 0;
|
||||
do {
|
||||
if (outputBits > bits) {
|
||||
! buf <<= bits;
|
||||
! if (!(a0i & 1)) {
|
||||
! buf |= 0xff >> (8 - bits);
|
||||
}
|
||||
! outputBits -= bits;
|
||||
! bits = 0;
|
||||
} else {
|
||||
! buf <<= outputBits;
|
||||
! if (!(a0i & 1)) {
|
||||
! buf |= 0xff >> (8 - outputBits);
|
||||
}
|
||||
+ bits -= outputBits;
|
||||
outputBits = 0;
|
||||
! if (codingLine[a0i] < columns) {
|
||||
! ++a0i;
|
||||
! outputBits = codingLine[a0i] - codingLine[a0i - 1];
|
||||
! } else if (bits > 0) {
|
||||
! buf <<= bits;
|
||||
! bits = 0;
|
||||
}
|
||||
}
|
||||
! } while (bits);
|
||||
! }
|
||||
! if (black) {
|
||||
! buf ^= 0xff;
|
||||
}
|
||||
return buf;
|
||||
}
|
||||
|
||||
***************
|
||||
*** 1661,1666 ****
|
||||
--- 1690,1698 ----
|
||||
code = 0; // make gcc happy
|
||||
if (endOfBlock) {
|
||||
code = lookBits(12);
|
||||
+ if (code == EOF) {
|
||||
+ return 1;
|
||||
+ }
|
||||
if ((code >> 5) == 0) {
|
||||
p = &whiteTab1[code];
|
||||
} else {
|
||||
***************
|
||||
*** 1673,1678 ****
|
||||
--- 1705,1713 ----
|
||||
} else {
|
||||
for (n = 1; n <= 9; ++n) {
|
||||
code = lookBits(n);
|
||||
+ if (code == EOF) {
|
||||
+ return 1;
|
||||
+ }
|
||||
if (n < 9) {
|
||||
code <<= 9 - n;
|
||||
}
|
||||
***************
|
||||
*** 1684,1689 ****
|
||||
--- 1719,1727 ----
|
||||
}
|
||||
for (n = 11; n <= 12; ++n) {
|
||||
code = lookBits(n);
|
||||
+ if (code == EOF) {
|
||||
+ return 1;
|
||||
+ }
|
||||
if (n < 12) {
|
||||
code <<= 12 - n;
|
||||
}
|
||||
***************
|
||||
*** 1709,1717 ****
|
||||
code = 0; // make gcc happy
|
||||
if (endOfBlock) {
|
||||
code = lookBits(13);
|
||||
if ((code >> 7) == 0) {
|
||||
p = &blackTab1[code];
|
||||
! } else if ((code >> 9) == 0) {
|
||||
p = &blackTab2[(code >> 1) - 64];
|
||||
} else {
|
||||
p = &blackTab3[code >> 7];
|
||||
--- 1747,1758 ----
|
||||
code = 0; // make gcc happy
|
||||
if (endOfBlock) {
|
||||
code = lookBits(13);
|
||||
+ if (code == EOF) {
|
||||
+ return 1;
|
||||
+ }
|
||||
if ((code >> 7) == 0) {
|
||||
p = &blackTab1[code];
|
||||
! } else if ((code >> 9) == 0 && (code >> 7) != 0) {
|
||||
p = &blackTab2[(code >> 1) - 64];
|
||||
} else {
|
||||
p = &blackTab3[code >> 7];
|
||||
***************
|
||||
*** 1723,1728 ****
|
||||
--- 1764,1772 ----
|
||||
} else {
|
||||
for (n = 2; n <= 6; ++n) {
|
||||
code = lookBits(n);
|
||||
+ if (code == EOF) {
|
||||
+ return 1;
|
||||
+ }
|
||||
if (n < 6) {
|
||||
code <<= 6 - n;
|
||||
}
|
||||
***************
|
||||
*** 1734,1739 ****
|
||||
--- 1778,1786 ----
|
||||
}
|
||||
for (n = 7; n <= 12; ++n) {
|
||||
code = lookBits(n);
|
||||
+ if (code == EOF) {
|
||||
+ return 1;
|
||||
+ }
|
||||
if (n < 12) {
|
||||
code <<= 12 - n;
|
||||
}
|
||||
***************
|
||||
*** 1747,1752 ****
|
||||
--- 1794,1802 ----
|
||||
}
|
||||
for (n = 10; n <= 13; ++n) {
|
||||
code = lookBits(n);
|
||||
+ if (code == EOF) {
|
||||
+ return 1;
|
||||
+ }
|
||||
if (n < 13) {
|
||||
code <<= 13 - n;
|
||||
}
|
||||
***************
|
||||
*** 1961,1966 ****
|
||||
--- 2011,2022 ----
|
||||
// allocate a buffer for the whole image
|
||||
bufWidth = ((width + mcuWidth - 1) / mcuWidth) * mcuWidth;
|
||||
bufHeight = ((height + mcuHeight - 1) / mcuHeight) * mcuHeight;
|
||||
+ if (bufWidth <= 0 || bufHeight <= 0 ||
|
||||
+ bufWidth > INT_MAX / bufWidth / (int)sizeof(int)) {
|
||||
+ error(getPos(), "Invalid image size in DCT stream");
|
||||
+ y = height;
|
||||
+ return;
|
||||
+ }
|
||||
for (i = 0; i < numComps; ++i) {
|
||||
frameBuf[i] = (int *)gmallocn(bufWidth * bufHeight, sizeof(int));
|
||||
memset(frameBuf[i], 0, bufWidth * bufHeight * sizeof(int));
|
||||
***************
|
||||
*** 3036,3041 ****
|
||||
--- 3092,3102 ----
|
||||
}
|
||||
scanInfo.firstCoeff = str->getChar();
|
||||
scanInfo.lastCoeff = str->getChar();
|
||||
+ if (scanInfo.firstCoeff < 0 || scanInfo.lastCoeff > 63 ||
|
||||
+ scanInfo.firstCoeff > scanInfo.lastCoeff) {
|
||||
+ error(getPos(), "Bad DCT coefficient numbers in scan info block");
|
||||
+ return gFalse;
|
||||
+ }
|
||||
c = str->getChar();
|
||||
scanInfo.ah = (c >> 4) & 0x0f;
|
||||
scanInfo.al = c & 0x0f;
|
||||
diff -c -r xpdf-3.02pl1.orig/xpdf/Stream.h xpdf-3.02/xpdf/Stream.h
|
||||
*** xpdf-3.02pl1.orig/xpdf/Stream.h Tue Feb 27 14:05:52 2007
|
||||
--- xpdf-3.02/xpdf/Stream.h Thu Oct 25 15:48:15 2007
|
||||
***************
|
||||
*** 528,540 ****
|
||||
int row; // current row
|
||||
int inputBuf; // input buffer
|
||||
int inputBits; // number of bits in input buffer
|
||||
! short *refLine; // reference line changing elements
|
||||
! int b1; // index into refLine
|
||||
! short *codingLine; // coding line changing elements
|
||||
! int a0; // index into codingLine
|
||||
int outputBits; // remaining ouput bits
|
||||
int buf; // character buffer
|
||||
|
||||
short getTwoDimCode();
|
||||
short getWhiteCode();
|
||||
short getBlackCode();
|
||||
--- 528,542 ----
|
||||
int row; // current row
|
||||
int inputBuf; // input buffer
|
||||
int inputBits; // number of bits in input buffer
|
||||
! int *codingLine; // coding line changing elements
|
||||
! int *refLine; // reference line changing elements
|
||||
! int a0i; // index into codingLine
|
||||
! GBool err; // error on current line
|
||||
int outputBits; // remaining ouput bits
|
||||
int buf; // character buffer
|
||||
|
||||
+ void addPixels(int a1, int black);
|
||||
+ void addPixelsNeg(int a1, int black);
|
||||
short getTwoDimCode();
|
||||
short getWhiteCode();
|
||||
short getBlackCode();
|
||||
1145
xpdf-3.02pl3.patch
Normal file
1145
xpdf-3.02pl3.patch
Normal file
File diff suppressed because it is too large
Load diff
282
xpdf-3.02pl4.patch
Normal file
282
xpdf-3.02pl4.patch
Normal file
|
|
@ -0,0 +1,282 @@
|
|||
*** xpdf-3.02.orig/xpdf/Stream.cc Fri Jul 24 14:30:46 2009
|
||||
--- xpdf-3.02/xpdf/Stream.cc Mon Oct 5 11:07:49 2009
|
||||
***************
|
||||
*** 323,328 ****
|
||||
--- 323,332 ----
|
||||
} else {
|
||||
imgLineSize = nVals;
|
||||
}
|
||||
+ if (width > INT_MAX / nComps) {
|
||||
+ // force a call to gmallocn(-1,...), which will throw an exception
|
||||
+ imgLineSize = -1;
|
||||
+ }
|
||||
imgLine = (Guchar *)gmallocn(imgLineSize, sizeof(Guchar));
|
||||
imgIdx = nVals;
|
||||
}
|
||||
*** xpdf-3.02.orig/xpdf/PSOutputDev.cc Tue Feb 27 14:05:52 2007
|
||||
--- xpdf-3.02/xpdf/PSOutputDev.cc Fri Oct 2 12:38:58 2009
|
||||
***************
|
||||
*** 4301,4307 ****
|
||||
width, -height, height);
|
||||
|
||||
// allocate a line buffer
|
||||
! lineBuf = (Guchar *)gmalloc(4 * width);
|
||||
|
||||
// set up to process the data stream
|
||||
imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(),
|
||||
--- 4301,4307 ----
|
||||
width, -height, height);
|
||||
|
||||
// allocate a line buffer
|
||||
! lineBuf = (Guchar *)gmallocn(width, 4);
|
||||
|
||||
// set up to process the data stream
|
||||
imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(),
|
||||
diff -r -c xpdf-3.02.orig/splash/Splash.cc xpdf-3.02/splash/Splash.cc
|
||||
*** xpdf-3.02.orig/splash/Splash.cc Tue Feb 27 14:05:52 2007
|
||||
--- xpdf-3.02/splash/Splash.cc Fri Aug 14 14:05:08 2009
|
||||
***************
|
||||
*** 12,17 ****
|
||||
--- 12,18 ----
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
+ #include <limits.h>
|
||||
#include "gmem.h"
|
||||
#include "SplashErrorCodes.h"
|
||||
#include "SplashMath.h"
|
||||
***************
|
||||
*** 1912,1918 ****
|
||||
xq = w % scaledWidth;
|
||||
|
||||
// allocate pixel buffer
|
||||
! pixBuf = (SplashColorPtr)gmalloc((yp + 1) * w);
|
||||
|
||||
// initialize the pixel pipe
|
||||
pipeInit(&pipe, 0, 0, state->fillPattern, NULL, state->fillAlpha,
|
||||
--- 1913,1922 ----
|
||||
xq = w % scaledWidth;
|
||||
|
||||
// allocate pixel buffer
|
||||
! if (yp < 0 || yp > INT_MAX - 1) {
|
||||
! return splashErrBadArg;
|
||||
! }
|
||||
! pixBuf = (SplashColorPtr)gmallocn(yp + 1, w);
|
||||
|
||||
// initialize the pixel pipe
|
||||
pipeInit(&pipe, 0, 0, state->fillPattern, NULL, state->fillAlpha,
|
||||
***************
|
||||
*** 2208,2216 ****
|
||||
xq = w % scaledWidth;
|
||||
|
||||
// allocate pixel buffers
|
||||
! colorBuf = (SplashColorPtr)gmalloc((yp + 1) * w * nComps);
|
||||
if (srcAlpha) {
|
||||
! alphaBuf = (Guchar *)gmalloc((yp + 1) * w);
|
||||
} else {
|
||||
alphaBuf = NULL;
|
||||
}
|
||||
--- 2212,2223 ----
|
||||
xq = w % scaledWidth;
|
||||
|
||||
// allocate pixel buffers
|
||||
! if (yp < 0 || yp > INT_MAX - 1 || w > INT_MAX / nComps) {
|
||||
! return splashErrBadArg;
|
||||
! }
|
||||
! colorBuf = (SplashColorPtr)gmallocn(yp + 1, w * nComps);
|
||||
if (srcAlpha) {
|
||||
! alphaBuf = (Guchar *)gmallocn(yp + 1, w);
|
||||
} else {
|
||||
alphaBuf = NULL;
|
||||
}
|
||||
diff -r -c xpdf-3.02.orig/splash/SplashErrorCodes.h xpdf-3.02/splash/SplashErrorCodes.h
|
||||
*** xpdf-3.02.orig/splash/SplashErrorCodes.h Tue Feb 27 14:05:52 2007
|
||||
--- xpdf-3.02/splash/SplashErrorCodes.h Fri Aug 14 14:03:46 2009
|
||||
***************
|
||||
*** 29,32 ****
|
||||
--- 29,34 ----
|
||||
|
||||
#define splashErrSingularMatrix 8 // matrix is singular
|
||||
|
||||
+ #define splashErrBadArg 9 // bad argument
|
||||
+
|
||||
#endif
|
||||
*** xpdf-3.02.orig/splash/SplashBitmap.cc Tue Feb 27 14:05:52 2007
|
||||
--- xpdf-3.02/splash/SplashBitmap.cc Wed Aug 19 14:55:39 2009
|
||||
***************
|
||||
*** 11,16 ****
|
||||
--- 11,17 ----
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
+ #include <limits.h>
|
||||
#include "gmem.h"
|
||||
#include "SplashErrorCodes.h"
|
||||
#include "SplashBitmap.h"
|
||||
***************
|
||||
*** 27,56 ****
|
||||
mode = modeA;
|
||||
switch (mode) {
|
||||
case splashModeMono1:
|
||||
! rowSize = (width + 7) >> 3;
|
||||
break;
|
||||
case splashModeMono8:
|
||||
! rowSize = width;
|
||||
break;
|
||||
case splashModeRGB8:
|
||||
case splashModeBGR8:
|
||||
! rowSize = width * 3;
|
||||
break;
|
||||
#if SPLASH_CMYK
|
||||
case splashModeCMYK8:
|
||||
! rowSize = width * 4;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
! rowSize += rowPad - 1;
|
||||
! rowSize -= rowSize % rowPad;
|
||||
! data = (SplashColorPtr)gmalloc(rowSize * height);
|
||||
if (!topDown) {
|
||||
data += (height - 1) * rowSize;
|
||||
rowSize = -rowSize;
|
||||
}
|
||||
if (alphaA) {
|
||||
! alpha = (Guchar *)gmalloc(width * height);
|
||||
} else {
|
||||
alpha = NULL;
|
||||
}
|
||||
--- 28,75 ----
|
||||
mode = modeA;
|
||||
switch (mode) {
|
||||
case splashModeMono1:
|
||||
! if (width > 0) {
|
||||
! rowSize = (width + 7) >> 3;
|
||||
! } else {
|
||||
! rowSize = -1;
|
||||
! }
|
||||
break;
|
||||
case splashModeMono8:
|
||||
! if (width > 0) {
|
||||
! rowSize = width;
|
||||
! } else {
|
||||
! rowSize = -1;
|
||||
! }
|
||||
break;
|
||||
case splashModeRGB8:
|
||||
case splashModeBGR8:
|
||||
! if (width > 0 && width <= INT_MAX / 3) {
|
||||
! rowSize = width * 3;
|
||||
! } else {
|
||||
! rowSize = -1;
|
||||
! }
|
||||
break;
|
||||
#if SPLASH_CMYK
|
||||
case splashModeCMYK8:
|
||||
! if (width > 0 && width <= INT_MAX / 4) {
|
||||
! rowSize = width * 4;
|
||||
! } else {
|
||||
! rowSize = -1;
|
||||
! }
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
! if (rowSize > 0) {
|
||||
! rowSize += rowPad - 1;
|
||||
! rowSize -= rowSize % rowPad;
|
||||
! }
|
||||
! data = (SplashColorPtr)gmallocn(height, rowSize);
|
||||
if (!topDown) {
|
||||
data += (height - 1) * rowSize;
|
||||
rowSize = -rowSize;
|
||||
}
|
||||
if (alphaA) {
|
||||
! alpha = (Guchar *)gmallocn(width, height);
|
||||
} else {
|
||||
alpha = NULL;
|
||||
}
|
||||
*** xpdf-3.02.orig/xpdf/XRef.cc Tue Feb 27 14:05:52 2007
|
||||
--- xpdf-3.02/xpdf/XRef.cc Tue Oct 13 11:57:24 2009
|
||||
***************
|
||||
*** 52,57 ****
|
||||
--- 52,59 ----
|
||||
// generation 0.
|
||||
ObjectStream(XRef *xref, int objStrNumA);
|
||||
|
||||
+ GBool isOk() { return ok; }
|
||||
+
|
||||
~ObjectStream();
|
||||
|
||||
// Return the object number of this object stream.
|
||||
***************
|
||||
*** 67,72 ****
|
||||
--- 69,75 ----
|
||||
int nObjects; // number of objects in the stream
|
||||
Object *objs; // the objects (length = nObjects)
|
||||
int *objNums; // the object numbers (length = nObjects)
|
||||
+ GBool ok;
|
||||
};
|
||||
|
||||
ObjectStream::ObjectStream(XRef *xref, int objStrNumA) {
|
||||
***************
|
||||
*** 80,85 ****
|
||||
--- 83,89 ----
|
||||
nObjects = 0;
|
||||
objs = NULL;
|
||||
objNums = NULL;
|
||||
+ ok = gFalse;
|
||||
|
||||
if (!xref->fetch(objStrNum, 0, &objStr)->isStream()) {
|
||||
goto err1;
|
||||
***************
|
||||
*** 105,110 ****
|
||||
--- 109,121 ----
|
||||
goto err1;
|
||||
}
|
||||
|
||||
+ // this is an arbitrary limit to avoid integer overflow problems
|
||||
+ // in the 'new Object[nObjects]' call (Acrobat apparently limits
|
||||
+ // object streams to 100-200 objects)
|
||||
+ if (nObjects > 1000000) {
|
||||
+ error(-1, "Too many objects in an object stream");
|
||||
+ goto err1;
|
||||
+ }
|
||||
objs = new Object[nObjects];
|
||||
objNums = (int *)gmallocn(nObjects, sizeof(int));
|
||||
offsets = (int *)gmallocn(nObjects, sizeof(int));
|
||||
***************
|
||||
*** 161,170 ****
|
||||
}
|
||||
|
||||
gfree(offsets);
|
||||
|
||||
err1:
|
||||
objStr.free();
|
||||
- return;
|
||||
}
|
||||
|
||||
ObjectStream::~ObjectStream() {
|
||||
--- 172,181 ----
|
||||
}
|
||||
|
||||
gfree(offsets);
|
||||
+ ok = gTrue;
|
||||
|
||||
err1:
|
||||
objStr.free();
|
||||
}
|
||||
|
||||
ObjectStream::~ObjectStream() {
|
||||
***************
|
||||
*** 837,842 ****
|
||||
--- 848,858 ----
|
||||
delete objStr;
|
||||
}
|
||||
objStr = new ObjectStream(this, e->offset);
|
||||
+ if (!objStr->isOk()) {
|
||||
+ delete objStr;
|
||||
+ objStr = NULL;
|
||||
+ goto err;
|
||||
+ }
|
||||
}
|
||||
objStr->getObject(e->gen, num, obj);
|
||||
break;
|
||||
41
xpdf-3.02pl5.patch
Normal file
41
xpdf-3.02pl5.patch
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
*** xpdf-3.02.orig/xpdf/Gfx.cc Tue Feb 27 14:05:52 2007
|
||||
--- xpdf-3.02/xpdf/Gfx.cc Mon Oct 11 15:39:52 2010
|
||||
***************
|
||||
*** 461,466 ****
|
||||
--- 461,467 ----
|
||||
baseMatrix[i] = state->getCTM()[i];
|
||||
}
|
||||
formDepth = 0;
|
||||
+ parser = NULL;
|
||||
abortCheckCbk = abortCheckCbkA;
|
||||
abortCheckCbkData = abortCheckCbkDataA;
|
||||
|
||||
***************
|
||||
*** 500,505 ****
|
||||
--- 501,507 ----
|
||||
baseMatrix[i] = state->getCTM()[i];
|
||||
}
|
||||
formDepth = 0;
|
||||
+ parser = NULL;
|
||||
abortCheckCbk = abortCheckCbkA;
|
||||
abortCheckCbkData = abortCheckCbkDataA;
|
||||
|
||||
*** xpdf-3.02.orig/fofi/FoFiType1.cc Tue Feb 27 14:05:51 2007
|
||||
--- xpdf-3.02/fofi/FoFiType1.cc Mon Oct 11 15:44:13 2010
|
||||
***************
|
||||
*** 224,230 ****
|
||||
code = code * 8 + (*p2 - '0');
|
||||
}
|
||||
}
|
||||
! if (code < 256) {
|
||||
for (p = p2; *p == ' ' || *p == '\t'; ++p) ;
|
||||
if (*p == '/') {
|
||||
++p;
|
||||
--- 224,230 ----
|
||||
code = code * 8 + (*p2 - '0');
|
||||
}
|
||||
}
|
||||
! if (code >= 0 && code < 256) {
|
||||
for (p = p2; *p == ' ' || *p == '\t'; ++p) ;
|
||||
if (*p == '/') {
|
||||
++p;
|
||||
57
xpdf-3.03-64bit.patch
Normal file
57
xpdf-3.03-64bit.patch
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
diff -up xpdf-3.03/goo/gmem.cc.alloc xpdf-3.03/goo/gmem.cc
|
||||
--- xpdf-3.03/goo/gmem.cc.alloc 2011-08-15 17:08:53.000000000 -0400
|
||||
+++ xpdf-3.03/goo/gmem.cc 2011-08-22 13:48:31.891115878 -0400
|
||||
@@ -47,9 +47,9 @@ static int gMemInUse = 0;
|
||||
|
||||
#endif /* DEBUG_MEM */
|
||||
|
||||
-void *gmalloc(int size) GMEM_EXCEP {
|
||||
+void *gmalloc(size_t size) GMEM_EXCEP {
|
||||
#ifdef DEBUG_MEM
|
||||
- int size1;
|
||||
+ size_t size1;
|
||||
char *mem;
|
||||
GMemHdr *hdr;
|
||||
void *data;
|
||||
@@ -122,11 +122,11 @@ void *gmalloc(int size) GMEM_EXCEP {
|
||||
#endif
|
||||
}
|
||||
|
||||
-void *grealloc(void *p, int size) GMEM_EXCEP {
|
||||
+void *grealloc(void *p, size_t size) GMEM_EXCEP {
|
||||
#ifdef DEBUG_MEM
|
||||
GMemHdr *hdr;
|
||||
void *q;
|
||||
- int oldSize;
|
||||
+ size_t oldSize;
|
||||
|
||||
if (size < 0) {
|
||||
#if USE_EXCEPTIONS
|
||||
@@ -227,7 +227,7 @@ void *greallocn(void *p, int nObjs, int
|
||||
|
||||
void gfree(void *p) {
|
||||
#ifdef DEBUG_MEM
|
||||
- int size;
|
||||
+ size_t size;
|
||||
GMemHdr *hdr;
|
||||
unsigned long *trl, *clr;
|
||||
|
||||
diff -up xpdf-3.03/goo/gmem.h.alloc xpdf-3.03/goo/gmem.h
|
||||
--- xpdf-3.03/goo/gmem.h.alloc 2011-08-15 17:08:53.000000000 -0400
|
||||
+++ xpdf-3.03/goo/gmem.h 2011-08-22 13:47:27.274853540 -0400
|
||||
@@ -36,13 +36,13 @@ extern "C" {
|
||||
* Same as malloc, but prints error message and exits if malloc()
|
||||
* returns NULL.
|
||||
*/
|
||||
-extern void *gmalloc(int size) GMEM_EXCEP;
|
||||
+extern void *gmalloc(size_t size) GMEM_EXCEP;
|
||||
|
||||
/*
|
||||
* Same as realloc, but prints error message and exits if realloc()
|
||||
* returns NULL. If <p> is NULL, calls malloc instead of realloc().
|
||||
*/
|
||||
-extern void *grealloc(void *p, int size) GMEM_EXCEP;
|
||||
+extern void *grealloc(void *p, size_t size) GMEM_EXCEP;
|
||||
|
||||
/*
|
||||
* These are similar to gmalloc and grealloc, but take an object count
|
||||
55
xpdf-3.03-CVE-2012-2142.diff
Normal file
55
xpdf-3.03-CVE-2012-2142.diff
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
From 3945969e0072217c143fefa3044512a31ac2afa8 Mon Sep 17 00:00:00 2001
|
||||
From: mancha <mancha1@hush.com>
|
||||
Date: Sun, 11 Aug 2013
|
||||
Subject: CVE-2012-2142
|
||||
|
||||
Filter stuff that might end up in the shell to address CVE-2012-2142.
|
||||
This code was adapted from the Poppler project.
|
||||
---
|
||||
Error.cc | 21 ++++++++++++++++-----
|
||||
1 file changed, 16 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/xpdf/Error.cc 2013-08-11
|
||||
+++ b/xpdf/Error.cc 2013-08-11
|
||||
@@ -43,7 +43,7 @@ void setErrorCallback(void (*cbk)(void *
|
||||
|
||||
void CDECL error(ErrorCategory category, int pos, const char *msg, ...) {
|
||||
va_list args;
|
||||
- GString *s;
|
||||
+ GString *s, *sanitized;
|
||||
|
||||
// NB: this can be called before the globalParams object is created
|
||||
if (!errorCbk && globalParams && globalParams->getErrQuiet()) {
|
||||
@@ -52,17 +52,28 @@ void CDECL error(ErrorCategory category,
|
||||
va_start(args, msg);
|
||||
s = GString::formatv(msg, args);
|
||||
va_end(args);
|
||||
+
|
||||
+ sanitized = new GString ();
|
||||
+ for (int i = 0; i < s->getLength(); ++i) {
|
||||
+ const char c = s->getChar(i);
|
||||
+ if (c < (char)0x20 || c >= (char)0x7f) {
|
||||
+ sanitized->appendf("<{0:02x}>", c & 0xff);
|
||||
+ } else {
|
||||
+ sanitized->append(c);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (errorCbk) {
|
||||
- (*errorCbk)(errorCbkData, category, pos, s->getCString());
|
||||
+ (*errorCbk)(errorCbkData, category, pos, sanitized->getCString());
|
||||
} else {
|
||||
if (pos >= 0) {
|
||||
fprintf(stderr, "%s (%d): %s\n",
|
||||
- errorCategoryNames[category], pos, s->getCString());
|
||||
+ errorCategoryNames[category], pos, sanitized->getCString());
|
||||
} else {
|
||||
fprintf(stderr, "%s: %s\n",
|
||||
- errorCategoryNames[category], s->getCString());
|
||||
+ errorCategoryNames[category], sanitized->getCString());
|
||||
}
|
||||
fflush(stderr);
|
||||
}
|
||||
- delete s;
|
||||
+ delete sanitized;
|
||||
}
|
||||
12
xpdf-3.03-compile-fix.patch
Normal file
12
xpdf-3.03-compile-fix.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -up xpdf-3.03/xpdf/XPDFViewer.cc.BAD xpdf-3.03/xpdf/XPDFViewer.cc
|
||||
--- xpdf-3.03/xpdf/XPDFViewer.cc.BAD 2011-08-22 14:19:42.845075813 -0400
|
||||
+++ xpdf-3.03/xpdf/XPDFViewer.cc 2011-08-22 14:19:47.953013145 -0400
|
||||
@@ -1807,7 +1807,7 @@ void XPDFViewer::initToolbar(Widget pare
|
||||
menuPane = XmCreatePulldownMenu(toolBar, "zoomMenuPane", args, n);
|
||||
for (i = 0; i < nZoomMenuItems; ++i) {
|
||||
n = 0;
|
||||
- s = XmStringCreateLocalized(zoomMenuInfo[i].label);
|
||||
+ s = XmStringCreateLocalized((char *)zoomMenuInfo[i].label);
|
||||
XtSetArg(args[n], XmNlabelString, s); ++n;
|
||||
XtSetArg(args[n], XmNuserData, (XtPointer)i); ++n;
|
||||
sprintf(buf, "zoom%d", i);
|
||||
48
xpdf-3.03-crash.patch
Normal file
48
xpdf-3.03-crash.patch
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
diff -up xpdf-3.03/fofi/FoFiType1.cc.crash xpdf-3.03/fofi/FoFiType1.cc
|
||||
--- xpdf-3.03/fofi/FoFiType1.cc.crash 2011-08-15 17:08:53.000000000 -0400
|
||||
+++ xpdf-3.03/fofi/FoFiType1.cc 2011-08-22 13:44:32.936859153 -0400
|
||||
@@ -268,9 +268,14 @@ void FoFiType1::parse() {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
- if (strtok(buf, " \t") &&
|
||||
- (p = strtok(NULL, " \t\n\r")) && !strcmp(p, "def")) {
|
||||
- break;
|
||||
+ p = strtok(buf, " \t\n\r");
|
||||
+ if (p)
|
||||
+ {
|
||||
+ if (!strcmp(p, "def")) break;
|
||||
+ if (!strcmp(p, "readonly")) break;
|
||||
+ // the spec does not says this but i'm mantaining old xpdf behaviour that accepts "foo def" as end of the encoding array
|
||||
+ p = strtok(buf, " \t\n\r");
|
||||
+ if (p && !strcmp(p, "def")) break;
|
||||
}
|
||||
}
|
||||
}
|
||||
diff -up xpdf-3.03/splash/Splash.cc.crash xpdf-3.03/splash/Splash.cc
|
||||
--- xpdf-3.03/splash/Splash.cc.crash 2011-08-15 17:08:53.000000000 -0400
|
||||
+++ xpdf-3.03/splash/Splash.cc 2011-08-22 13:46:54.295231194 -0400
|
||||
@@ -2053,6 +2053,11 @@ SplashError Splash::fillWithPattern(Spla
|
||||
xPath->aaScale();
|
||||
}
|
||||
xPath->sort();
|
||||
+ if (!&xPath->segs[0])
|
||||
+ {
|
||||
+ delete xPath;
|
||||
+ return splashErrEmptyPath;
|
||||
+ }
|
||||
yMinI = state->clip->getYMinI();
|
||||
yMaxI = state->clip->getYMaxI();
|
||||
if (vectorAntialias && !inShading) {
|
||||
@@ -2194,6 +2199,11 @@ SplashError Splash::xorFill(SplashPath *
|
||||
}
|
||||
xPath = new SplashXPath(path, state->matrix, state->flatness, gTrue);
|
||||
xPath->sort();
|
||||
+ if (!&xPath->segs[0])
|
||||
+ {
|
||||
+ delete xPath;
|
||||
+ return splashErrEmptyPath;
|
||||
+ }
|
||||
scanner = new SplashXPathScanner(xPath, eo, state->clip->getYMinI(),
|
||||
state->clip->getYMaxI());
|
||||
|
||||
57
xpdf-3.04-64bit.patch
Normal file
57
xpdf-3.04-64bit.patch
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
diff -up xpdf-3.04/goo/gmem.cc.alloc xpdf-3.04/goo/gmem.cc
|
||||
--- xpdf-3.04/goo/gmem.cc.alloc 2014-05-28 14:50:50.000000000 -0400
|
||||
+++ xpdf-3.04/goo/gmem.cc 2014-05-29 15:00:18.670819951 -0400
|
||||
@@ -48,9 +48,9 @@ static int gMaxMemInUse = 0;
|
||||
|
||||
#endif /* DEBUG_MEM */
|
||||
|
||||
-void *gmalloc(int size) GMEM_EXCEP {
|
||||
+void *gmalloc(size_t size) GMEM_EXCEP {
|
||||
#ifdef DEBUG_MEM
|
||||
- int size1;
|
||||
+ size_t size1;
|
||||
char *mem;
|
||||
GMemHdr *hdr;
|
||||
void *data;
|
||||
@@ -106,11 +106,11 @@ void *gmalloc(int size) GMEM_EXCEP {
|
||||
#endif
|
||||
}
|
||||
|
||||
-void *grealloc(void *p, int size) GMEM_EXCEP {
|
||||
+void *grealloc(void *p, size_t size) GMEM_EXCEP {
|
||||
#ifdef DEBUG_MEM
|
||||
GMemHdr *hdr;
|
||||
void *q;
|
||||
- int oldSize;
|
||||
+ size_t oldSize;
|
||||
|
||||
if (size < 0) {
|
||||
gMemError("Invalid memory allocation size");
|
||||
@@ -186,7 +186,7 @@ void *greallocn(void *p, int nObjs, int
|
||||
|
||||
void gfree(void *p) {
|
||||
#ifdef DEBUG_MEM
|
||||
- int size;
|
||||
+ size_t size;
|
||||
GMemHdr *hdr;
|
||||
unsigned long *trl, *clr;
|
||||
|
||||
diff -up xpdf-3.04/goo/gmem.h.alloc xpdf-3.04/goo/gmem.h
|
||||
--- xpdf-3.04/goo/gmem.h.alloc 2014-05-28 14:50:50.000000000 -0400
|
||||
+++ xpdf-3.04/goo/gmem.h 2014-05-29 14:59:04.364344108 -0400
|
||||
@@ -36,13 +36,13 @@ extern "C" {
|
||||
* Same as malloc, but prints error message and exits if malloc()
|
||||
* returns NULL.
|
||||
*/
|
||||
-extern void *gmalloc(int size) GMEM_EXCEP;
|
||||
+extern void *gmalloc(size_t size) GMEM_EXCEP;
|
||||
|
||||
/*
|
||||
* Same as realloc, but prints error message and exits if realloc()
|
||||
* returns NULL. If <p> is NULL, calls malloc instead of realloc().
|
||||
*/
|
||||
-extern void *grealloc(void *p, int size) GMEM_EXCEP;
|
||||
+extern void *grealloc(void *p, size_t size) GMEM_EXCEP;
|
||||
|
||||
/*
|
||||
* These are similar to gmalloc and grealloc, but take an object count
|
||||
11
xpdf-3.04-localized.patch
Normal file
11
xpdf-3.04-localized.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
diff -up xpdf-3.04/xpdf/XPDFApp.cc.localized xpdf-3.04/xpdf/XPDFApp.cc
|
||||
--- xpdf-3.04/xpdf/XPDFApp.cc.localized 2014-12-02 13:54:56.720680945 -0500
|
||||
+++ xpdf-3.04/xpdf/XPDFApp.cc 2014-12-02 13:55:10.257585002 -0500
|
||||
@@ -125,6 +125,7 @@ static int xErrorHandler(Display *displa
|
||||
#endif
|
||||
|
||||
XPDFApp::XPDFApp(int *argc, char *argv[]) {
|
||||
+ XtSetLanguageProc(NULL, (XtLanguageProc)NULL, NULL);
|
||||
appShell = XtAppInitialize(&appContext, xpdfAppName, xOpts, nXOpts,
|
||||
argc, argv, fallbackResources, NULL, 0);
|
||||
display = XtDisplay(appShell);
|
||||
53
xpdf-3.04-nocmap.patch
Normal file
53
xpdf-3.04-nocmap.patch
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
diff -up xpdf-3.04/xpdf-chinese-simplified/add-to-xpdfrc.orig xpdf-3.04/xpdf-chinese-simplified/add-to-xpdfrc
|
||||
--- xpdf-3.04/xpdf-chinese-simplified/add-to-xpdfrc.orig 2014-05-29 15:01:29.238318492 -0400
|
||||
+++ xpdf-3.04/xpdf-chinese-simplified/add-to-xpdfrc 2014-05-29 15:02:30.453883329 -0400
|
||||
@@ -3,7 +3,7 @@ cidToUnicode Adobe-GB1 /usr/share/xpdf/ch
|
||||
unicodeMap ISO-2022-CN /usr/share/xpdf/chinese-simplified/ISO-2022-CN.unicodeMap
|
||||
unicodeMap EUC-CN /usr/share/xpdf/chinese-simplified/EUC-CN.unicodeMap
|
||||
unicodeMap GBK /usr/share/xpdf/chinese-simplified/GBK.unicodeMap
|
||||
-cMapDir Adobe-GB1 /usr/share/xpdf/chinese-simplified/CMap
|
||||
-toUnicodeDir /usr/share/xpdf/chinese-simplified/CMap
|
||||
+#cMapDir Adobe-GB1 /usr/share/xpdf/chinese-simplified/CMap
|
||||
+#toUnicodeDir /usr/share/xpdf/chinese-simplified/CMap
|
||||
#fontFileCC Adobe-GB1 /usr/..../gkai00mp.ttf
|
||||
#----- end Chinese Simplified support package
|
||||
diff -up xpdf-3.04/xpdf-chinese-traditional/add-to-xpdfrc.orig xpdf-3.04/xpdf-chinese-traditional/add-to-xpdfrc
|
||||
--- xpdf-3.04/xpdf-chinese-traditional/add-to-xpdfrc.orig 2014-05-29 15:01:29.237318499 -0400
|
||||
+++ xpdf-3.04/xpdf-chinese-traditional/add-to-xpdfrc 2014-05-29 15:02:01.979085766 -0400
|
||||
@@ -2,7 +2,7 @@
|
||||
cidToUnicode Adobe-CNS1 /usr/share/xpdf/chinese-traditional/Adobe-CNS1.cidToUnicode
|
||||
unicodeMap Big5 /usr/share/xpdf/chinese-traditional/Big5.unicodeMap
|
||||
unicodeMap Big5ascii /usr/share/xpdf/chinese-traditional/Big5ascii.unicodeMap
|
||||
-cMapDir Adobe-CNS1 /usr/share/xpdf/chinese-traditional/CMap
|
||||
-toUnicodeDir /usr/share/xpdf/chinese-traditional/CMap
|
||||
+#cMapDir Adobe-CNS1 /usr/share/xpdf/chinese-traditional/CMap
|
||||
+#toUnicodeDir /usr/share/xpdf/chinese-traditional/CMap
|
||||
#fontFileCC Adobe-CNS1 /usr/..../bkai00mp.ttf
|
||||
#----- end Chinese Traditional support package
|
||||
diff -up xpdf-3.04/xpdf-japanese/add-to-xpdfrc.orig xpdf-3.04/xpdf-japanese/add-to-xpdfrc
|
||||
--- xpdf-3.04/xpdf-japanese/add-to-xpdfrc.orig 2014-05-29 15:01:29.238318492 -0400
|
||||
+++ xpdf-3.04/xpdf-japanese/add-to-xpdfrc 2014-05-29 15:02:43.814788329 -0400
|
||||
@@ -3,7 +3,7 @@ cidToUnicode Adobe-Japan1 /usr/share/xpdf
|
||||
unicodeMap ISO-2022-JP /usr/share/xpdf/japanese/ISO-2022-JP.unicodeMap
|
||||
unicodeMap EUC-JP /usr/share/xpdf/japanese/EUC-JP.unicodeMap
|
||||
unicodeMap Shift-JIS /usr/share/xpdf/japanese/Shift-JIS.unicodeMap
|
||||
-cMapDir Adobe-Japan1 /usr/share/xpdf/japanese/CMap
|
||||
-toUnicodeDir /usr/share/xpdf/japanese/CMap
|
||||
+#cMapDir Adobe-Japan1 /usr/share/xpdf/japanese/CMap
|
||||
+#toUnicodeDir /usr/share/xpdf/japanese/CMap
|
||||
#fontFileCC Adobe-Japan1 /usr/..../kochi-mincho.ttf
|
||||
#----- end Japanese support package
|
||||
diff -up xpdf-3.04/xpdf-korean/add-to-xpdfrc.orig xpdf-3.04/xpdf-korean/add-to-xpdfrc
|
||||
--- xpdf-3.04/xpdf-korean/add-to-xpdfrc.orig 2014-05-29 15:01:29.238318492 -0400
|
||||
+++ xpdf-3.04/xpdf-korean/add-to-xpdfrc 2014-05-29 15:02:16.581981953 -0400
|
||||
@@ -1,8 +1,8 @@
|
||||
#----- begin Korean support package (2011-sep-02)
|
||||
cidToUnicode Adobe-Korea1 /usr/share/xpdf/korean/Adobe-Korea1.cidToUnicode
|
||||
unicodeMap ISO-2022-KR /usr/share/xpdf/korean/ISO-2022-KR.unicodeMap
|
||||
-cMapDir Adobe-Korea1 /usr/share/xpdf/korean/CMap
|
||||
-toUnicodeDir /usr/share/xpdf/korean/CMap
|
||||
+#cMapDir Adobe-Korea1 /usr/share/xpdf/korean/CMap
|
||||
+#toUnicodeDir /usr/share/xpdf/korean/CMap
|
||||
#fontFileCC Adobe-Korea1 /usr/..../batang.ttf"
|
||||
#fontFileCC Unidocs-Korea1 /usr/..../batang.ttf"
|
||||
#----- end Korean support package
|
||||
32
xpdf-3.04-pdftopng.patch
Normal file
32
xpdf-3.04-pdftopng.patch
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
diff -up xpdf-3.04/Makefile.in.pdftopng xpdf-3.04/Makefile.in
|
||||
--- xpdf-3.04/Makefile.in.pdftopng 2014-05-29 15:56:14.405875939 -0400
|
||||
+++ xpdf-3.04/Makefile.in 2014-05-29 15:58:11.755031543 -0400
|
||||
@@ -37,6 +37,12 @@ xpdf: dummy
|
||||
cd @UP_DIR@splash; $(MAKE)
|
||||
cd @UP_DIR@xpdf; $(MAKE) xpdf$(EXE)
|
||||
|
||||
+pdftopng: dummy
|
||||
+ cd goo; $(MAKE)
|
||||
+ cd @UP_DIR@fofi; $(MAKE)
|
||||
+ cd @UP_DIR@splash; $(MAKE)
|
||||
+ cd @UP_DIR@xpdf; $(MAKE) pdftopng$(EXE)
|
||||
+
|
||||
pdftops: dummy
|
||||
cd goo; $(MAKE)
|
||||
cd @UP_DIR@fofi; $(MAKE)
|
||||
@@ -91,6 +97,7 @@ install: dummy
|
||||
$(INSTALL_PROGRAM) xpdf/pdfdetach$(EXE) $(DESTDIR)@bindir@/pdfdetach$(EXE)
|
||||
@X@ $(INSTALL_PROGRAM) xpdf/pdftoppm$(EXE) $(DESTDIR)@bindir@/pdftoppm$(EXE)
|
||||
$(INSTALL_PROGRAM) xpdf/pdfimages$(EXE) $(DESTDIR)@bindir@/pdfimages$(EXE)
|
||||
+ $(INSTALL_PROGRAM) xpdf/pdftopng$(EXE) $(DESTDIR)@bindir@/pdftopng$(EXE)
|
||||
-mkdir -p $(DESTDIR)@mandir@/man1
|
||||
@X@ $(INSTALL_DATA) $(srcdir)/doc/xpdf.1 $(DESTDIR)@mandir@/man1/xpdf.1
|
||||
$(INSTALL_DATA) $(srcdir)/doc/pdftops.1 $(DESTDIR)@mandir@/man1/pdftops.1
|
||||
@@ -100,6 +107,7 @@ install: dummy
|
||||
$(INSTALL_DATA) $(srcdir)/doc/pdfdetach.1 $(DESTDIR)@mandir@/man1/pdfdetach.1
|
||||
@X@ $(INSTALL_DATA) $(srcdir)/doc/pdftoppm.1 $(DESTDIR)@mandir@/man1/pdftoppm.1
|
||||
$(INSTALL_DATA) $(srcdir)/doc/pdfimages.1 $(DESTDIR)@mandir@/man1/pdfimages.1
|
||||
+ $(INSTALL_DATA) $(srcdir)/doc/pdftopng.1 $(DESTDIR)@mandir@/man1/pdftopng.1
|
||||
-mkdir -p $(DESTDIR)@mandir@/man5
|
||||
$(INSTALL_DATA) $(srcdir)/doc/xpdfrc.5 $(DESTDIR)@mandir@/man5/xpdfrc.5
|
||||
-mkdir -p $(DESTDIR)@sysconfdir@
|
||||
136
xpdf-3.04-redhat-new.patch
Normal file
136
xpdf-3.04-redhat-new.patch
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
diff -up xpdf-3.04/doc/sample-xpdfrc.orig xpdf-3.04/doc/sample-xpdfrc
|
||||
--- xpdf-3.04/doc/sample-xpdfrc.orig 2014-05-28 14:50:50.000000000 -0400
|
||||
+++ xpdf-3.04/doc/sample-xpdfrc 2014-05-29 14:50:23.704974484 -0400
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
# Set the default PostScript file or command.
|
||||
|
||||
-#psFile "|lpr -Pmyprinter"
|
||||
+psFile "|lpr"
|
||||
|
||||
# Set the default PostScript paper size -- this can be letter, legal,
|
||||
# A4, or A3. You can also specify a paper size as width and height
|
||||
@@ -88,4 +88,10 @@
|
||||
# clicked.
|
||||
|
||||
#launchCommand viewer-script
|
||||
-#urlCommand "netscape -remote 'openURL(%s)'"
|
||||
+urlCommand "xdg-open '%s'"
|
||||
+
|
||||
+# CJK
|
||||
+include /etc/xpdf/add-to-xpdfrc.japanese
|
||||
+include /etc/xpdf/add-to-xpdfrc.korean
|
||||
+include /etc/xpdf/add-to-xpdfrc.chinese-simplified
|
||||
+include /etc/xpdf/add-to-xpdfrc.chinese-traditional
|
||||
diff -up xpdf-3.04/doc/xpdfrc.5.orig xpdf-3.04/doc/xpdfrc.5
|
||||
--- xpdf-3.04/doc/xpdfrc.5.orig 2014-05-28 14:50:50.000000000 -0400
|
||||
+++ xpdf-3.04/doc/xpdfrc.5 2014-05-29 14:50:23.701974504 -0400
|
||||
@@ -7,7 +7,7 @@ All of the Xpdf tools read a single conf
|
||||
.I .xpdfrc
|
||||
file in your home directory, it will be read. Otherwise, a
|
||||
system-wide configuration file will be read from
|
||||
-.IR /usr/local/etc/xpdfrc ,
|
||||
+.IR /etc/xpdfrc ,
|
||||
if it exists. (This is its default location; depending on build
|
||||
options, it may be placed elsewhere.) On Win32 systems, the
|
||||
.I xpdfrc
|
||||
@@ -672,7 +672,7 @@ urlCommand "netscape \-remote 'open
|
||||
.fi
|
||||
.SH FILES
|
||||
.TP
|
||||
-.B /usr/local/etc/xpdfrc
|
||||
+.B /etc/xpdfrc
|
||||
This is the default location for the system-wide configuration file.
|
||||
Depending on build options, it may be placed elsewhere.
|
||||
.TP
|
||||
diff -up xpdf-3.04/xpdf-chinese-simplified/add-to-xpdfrc.orig xpdf-3.04/xpdf-chinese-simplified/add-to-xpdfrc
|
||||
--- xpdf-3.04/xpdf-chinese-simplified/add-to-xpdfrc.orig 2014-05-29 14:50:23.700974511 -0400
|
||||
+++ xpdf-3.04/xpdf-chinese-simplified/add-to-xpdfrc 2014-05-29 14:53:15.316783717 -0400
|
||||
@@ -1,9 +1,9 @@
|
||||
#----- begin Chinese Simplified support package (2011-sep-02)
|
||||
-cidToUnicode Adobe-GB1 /usr/local/share/xpdf/chinese-simplified/Adobe-GB1.cidToUnicode
|
||||
-unicodeMap ISO-2022-CN /usr/local/share/xpdf/chinese-simplified/ISO-2022-CN.unicodeMap
|
||||
-unicodeMap EUC-CN /usr/local/share/xpdf/chinese-simplified/EUC-CN.unicodeMap
|
||||
-unicodeMap GBK /usr/local/share/xpdf/chinese-simplified/GBK.unicodeMap
|
||||
-cMapDir Adobe-GB1 /usr/local/share/xpdf/chinese-simplified/CMap
|
||||
-toUnicodeDir /usr/local/share/xpdf/chinese-simplified/CMap
|
||||
+cidToUnicode Adobe-GB1 /usr/share/xpdf/chinese-simplified/Adobe-GB1.cidToUnicode
|
||||
+unicodeMap ISO-2022-CN /usr/share/xpdf/chinese-simplified/ISO-2022-CN.unicodeMap
|
||||
+unicodeMap EUC-CN /usr/share/xpdf/chinese-simplified/EUC-CN.unicodeMap
|
||||
+unicodeMap GBK /usr/share/xpdf/chinese-simplified/GBK.unicodeMap
|
||||
+cMapDir Adobe-GB1 /usr/share/xpdf/chinese-simplified/CMap
|
||||
+toUnicodeDir /usr/share/xpdf/chinese-simplified/CMap
|
||||
#fontFileCC Adobe-GB1 /usr/..../gkai00mp.ttf
|
||||
#----- end Chinese Simplified support package
|
||||
diff -up xpdf-3.04/xpdf-chinese-traditional/add-to-xpdfrc.orig xpdf-3.04/xpdf-chinese-traditional/add-to-xpdfrc
|
||||
--- xpdf-3.04/xpdf-chinese-traditional/add-to-xpdfrc.orig 2014-05-29 14:50:23.699974518 -0400
|
||||
+++ xpdf-3.04/xpdf-chinese-traditional/add-to-xpdfrc 2014-05-29 14:53:15.321783682 -0400
|
||||
@@ -1,8 +1,8 @@
|
||||
#----- begin Chinese Traditional support package (2011-sep-02)
|
||||
-cidToUnicode Adobe-CNS1 /usr/local/share/xpdf/chinese-traditional/Adobe-CNS1.cidToUnicode
|
||||
-unicodeMap Big5 /usr/local/share/xpdf/chinese-traditional/Big5.unicodeMap
|
||||
-unicodeMap Big5ascii /usr/local/share/xpdf/chinese-traditional/Big5ascii.unicodeMap
|
||||
-cMapDir Adobe-CNS1 /usr/local/share/xpdf/chinese-traditional/CMap
|
||||
-toUnicodeDir /usr/local/share/xpdf/chinese-traditional/CMap
|
||||
+cidToUnicode Adobe-CNS1 /usr/share/xpdf/chinese-traditional/Adobe-CNS1.cidToUnicode
|
||||
+unicodeMap Big5 /usr/share/xpdf/chinese-traditional/Big5.unicodeMap
|
||||
+unicodeMap Big5ascii /usr/share/xpdf/chinese-traditional/Big5ascii.unicodeMap
|
||||
+cMapDir Adobe-CNS1 /usr/share/xpdf/chinese-traditional/CMap
|
||||
+toUnicodeDir /usr/share/xpdf/chinese-traditional/CMap
|
||||
#fontFileCC Adobe-CNS1 /usr/..../bkai00mp.ttf
|
||||
#----- end Chinese Traditional support package
|
||||
diff -up xpdf-3.04/xpdf-cyrillic/add-to-xpdfrc.orig xpdf-3.04/xpdf-cyrillic/add-to-xpdfrc
|
||||
--- xpdf-3.04/xpdf-cyrillic/add-to-xpdfrc.orig 2014-05-29 14:50:23.704974484 -0400
|
||||
+++ xpdf-3.04/xpdf-cyrillic/add-to-xpdfrc 2014-05-29 14:53:15.325783654 -0400
|
||||
@@ -1,4 +1,4 @@
|
||||
#----- begin Cyrillic support package (2011-aug-15)
|
||||
-nameToUnicode /usr/local/share/xpdf/cyrillic/Bulgarian.nameToUnicode
|
||||
-unicodeMap KOI8-R /usr/local/share/xpdf/cyrillic/KOI8-R.unicodeMap
|
||||
+nameToUnicode /usr/share/xpdf/cyrillic/Bulgarian.nameToUnicode
|
||||
+unicodeMap KOI8-R /usr/share/xpdf/cyrillic/KOI8-R.unicodeMap
|
||||
#----- end Cyrillic support package
|
||||
diff -up xpdf-3.04/xpdf-japanese/add-to-xpdfrc.orig xpdf-3.04/xpdf-japanese/add-to-xpdfrc
|
||||
--- xpdf-3.04/xpdf-japanese/add-to-xpdfrc.orig 2014-05-29 14:50:23.700974511 -0400
|
||||
+++ xpdf-3.04/xpdf-japanese/add-to-xpdfrc 2014-05-29 14:53:15.340783550 -0400
|
||||
@@ -1,9 +1,9 @@
|
||||
#----- begin Japanese support package (2011-sep-02)
|
||||
-cidToUnicode Adobe-Japan1 /usr/local/share/xpdf/japanese/Adobe-Japan1.cidToUnicode
|
||||
-unicodeMap ISO-2022-JP /usr/local/share/xpdf/japanese/ISO-2022-JP.unicodeMap
|
||||
-unicodeMap EUC-JP /usr/local/share/xpdf/japanese/EUC-JP.unicodeMap
|
||||
-unicodeMap Shift-JIS /usr/local/share/xpdf/japanese/Shift-JIS.unicodeMap
|
||||
-cMapDir Adobe-Japan1 /usr/local/share/xpdf/japanese/CMap
|
||||
-toUnicodeDir /usr/local/share/xpdf/japanese/CMap
|
||||
+cidToUnicode Adobe-Japan1 /usr/share/xpdf/japanese/Adobe-Japan1.cidToUnicode
|
||||
+unicodeMap ISO-2022-JP /usr/share/xpdf/japanese/ISO-2022-JP.unicodeMap
|
||||
+unicodeMap EUC-JP /usr/share/xpdf/japanese/EUC-JP.unicodeMap
|
||||
+unicodeMap Shift-JIS /usr/share/xpdf/japanese/Shift-JIS.unicodeMap
|
||||
+cMapDir Adobe-Japan1 /usr/share/xpdf/japanese/CMap
|
||||
+toUnicodeDir /usr/share/xpdf/japanese/CMap
|
||||
#fontFileCC Adobe-Japan1 /usr/..../kochi-mincho.ttf
|
||||
#----- end Japanese support package
|
||||
diff -up xpdf-3.04/xpdf-korean/add-to-xpdfrc.orig xpdf-3.04/xpdf-korean/add-to-xpdfrc
|
||||
--- xpdf-3.04/xpdf-korean/add-to-xpdfrc.orig 2014-05-29 14:50:23.700974511 -0400
|
||||
+++ xpdf-3.04/xpdf-korean/add-to-xpdfrc 2014-05-29 14:53:15.345783515 -0400
|
||||
@@ -1,8 +1,8 @@
|
||||
#----- begin Korean support package (2011-sep-02)
|
||||
-cidToUnicode Adobe-Korea1 /usr/local/share/xpdf/korean/Adobe-Korea1.cidToUnicode
|
||||
-unicodeMap ISO-2022-KR /usr/local/share/xpdf/korean/ISO-2022-KR.unicodeMap
|
||||
-cMapDir Adobe-Korea1 /usr/local/share/xpdf/korean/CMap
|
||||
-toUnicodeDir /usr/local/share/xpdf/korean/CMap
|
||||
+cidToUnicode Adobe-Korea1 /usr/share/xpdf/korean/Adobe-Korea1.cidToUnicode
|
||||
+unicodeMap ISO-2022-KR /usr/share/xpdf/korean/ISO-2022-KR.unicodeMap
|
||||
+cMapDir Adobe-Korea1 /usr/share/xpdf/korean/CMap
|
||||
+toUnicodeDir /usr/share/xpdf/korean/CMap
|
||||
#fontFileCC Adobe-Korea1 /usr/..../batang.ttf"
|
||||
#fontFileCC Unidocs-Korea1 /usr/..../batang.ttf"
|
||||
#----- end Korean support package
|
||||
diff -up xpdf-3.04/xpdf-thai/add-to-xpdfrc.orig xpdf-3.04/xpdf-thai/add-to-xpdfrc
|
||||
--- xpdf-3.04/xpdf-thai/add-to-xpdfrc.orig 2014-05-29 14:50:23.703974490 -0400
|
||||
+++ xpdf-3.04/xpdf-thai/add-to-xpdfrc 2014-05-29 14:53:15.355783445 -0400
|
||||
@@ -1,4 +1,4 @@
|
||||
#----- begin Thai support package (2011-aug-15)
|
||||
-nameToUnicode /usr/local/share/xpdf/thai/Thai.nameToUnicode
|
||||
-unicodeMap TIS-620 /usr/local/share/xpdf/thai/TIS-620.unicodeMap
|
||||
+nameToUnicode /usr/share/xpdf/thai/Thai.nameToUnicode
|
||||
+unicodeMap TIS-620 /usr/share/xpdf/thai/TIS-620.unicodeMap
|
||||
#----- end Thai support package
|
||||
132
xpdf-4.00-permissions.patch
Normal file
132
xpdf-4.00-permissions.patch
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
diff -up xpdf-4.00/xpdf/PDFCore.cc.permissions xpdf-4.00/xpdf/PDFCore.cc
|
||||
diff -up xpdf-4.00/xpdf/pdfimages.cc.permissions xpdf-4.00/xpdf/pdfimages.cc
|
||||
--- xpdf-4.00/xpdf/pdfimages.cc.permissions 2017-08-08 19:22:50.000000000 -0400
|
||||
+++ xpdf-4.00/xpdf/pdfimages.cc 2017-08-16 18:08:04.474032500 -0400
|
||||
@@ -4,6 +4,8 @@
|
||||
//
|
||||
// Copyright 1998-2003 Glyph & Cog, LLC
|
||||
//
|
||||
+// Modified for Debian by Hamish Moffatt, 22 May 2002.
|
||||
+//
|
||||
//========================================================================
|
||||
|
||||
#include <aconf.h>
|
||||
@@ -126,12 +128,14 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
// check for copy permission
|
||||
+#ifdef ENFORCE_PERMISSIONS
|
||||
if (!doc->okToCopy()) {
|
||||
error(errNotAllowed, -1,
|
||||
"Copying of images from this document is not allowed.");
|
||||
exitCode = 3;
|
||||
goto err1;
|
||||
}
|
||||
+#endif
|
||||
|
||||
// get page range
|
||||
if (firstPage < 1)
|
||||
diff -up xpdf-4.00/xpdf/pdftohtml.cc.permissions xpdf-4.00/xpdf/pdftohtml.cc
|
||||
--- xpdf-4.00/xpdf/pdftohtml.cc.permissions 2017-08-16 18:10:36.656189850 -0400
|
||||
+++ xpdf-4.00/xpdf/pdftohtml.cc 2017-08-16 18:11:06.127445692 -0400
|
||||
@@ -137,6 +137,7 @@ int main(int argc, char *argv[]) {
|
||||
goto err1;
|
||||
}
|
||||
|
||||
+#ifdef ENFORCE_PERMISSIONS
|
||||
// check for copy permission
|
||||
if (!doc->okToCopy()) {
|
||||
error(errNotAllowed, -1,
|
||||
@@ -144,6 +145,7 @@ int main(int argc, char *argv[]) {
|
||||
exitCode = 3;
|
||||
goto err1;
|
||||
}
|
||||
+#endif
|
||||
|
||||
// get page range
|
||||
if (firstPage < 1) {
|
||||
diff -up xpdf-4.00/xpdf/pdftops.cc.permissions xpdf-4.00/xpdf/pdftops.cc
|
||||
--- xpdf-4.00/xpdf/pdftops.cc.permissions 2017-08-08 19:22:50.000000000 -0400
|
||||
+++ xpdf-4.00/xpdf/pdftops.cc 2017-08-16 18:08:04.475032475 -0400
|
||||
@@ -4,6 +4,8 @@
|
||||
//
|
||||
// Copyright 1996-2003 Glyph & Cog, LLC
|
||||
//
|
||||
+// Modified for Debian by Hamish Moffatt, 22 May 2002.
|
||||
+//
|
||||
//========================================================================
|
||||
|
||||
#include <aconf.h>
|
||||
@@ -321,12 +323,14 @@ int main(int argc, char *argv[]) {
|
||||
goto err1;
|
||||
}
|
||||
|
||||
+#ifdef ENFORCE_PERMISSIONS
|
||||
// check for print permission
|
||||
if (!doc->okToPrint()) {
|
||||
error(errNotAllowed, -1, "Printing this document is not allowed.");
|
||||
exitCode = 3;
|
||||
goto err1;
|
||||
}
|
||||
+#endif
|
||||
|
||||
// construct PostScript file name
|
||||
if (argc == 3) {
|
||||
diff -up xpdf-4.00/xpdf/pdftotext.cc.permissions xpdf-4.00/xpdf/pdftotext.cc
|
||||
--- xpdf-4.00/xpdf/pdftotext.cc.permissions 2017-08-08 19:22:50.000000000 -0400
|
||||
+++ xpdf-4.00/xpdf/pdftotext.cc 2017-08-16 18:08:04.475032475 -0400
|
||||
@@ -4,6 +4,8 @@
|
||||
//
|
||||
// Copyright 1997-2013 Glyph & Cog, LLC
|
||||
//
|
||||
+// Modified for Debian by Hamish Moffatt, 22 May 2002.
|
||||
+//
|
||||
//========================================================================
|
||||
|
||||
#include <aconf.h>
|
||||
@@ -198,6 +200,7 @@ int main(int argc, char *argv[]) {
|
||||
goto err2;
|
||||
}
|
||||
|
||||
+#ifdef ENFORCE_PERMISSIONS
|
||||
// check for copy permission
|
||||
if (!doc->okToCopy()) {
|
||||
error(errNotAllowed, -1,
|
||||
@@ -205,6 +208,7 @@ int main(int argc, char *argv[]) {
|
||||
exitCode = 3;
|
||||
goto err2;
|
||||
}
|
||||
+#endif
|
||||
|
||||
// construct text file name
|
||||
if (argc == 3) {
|
||||
diff -up xpdf-4.00/xpdf-qt/QtPDFCore.cc.permissions xpdf-4.00/xpdf-qt/QtPDFCore.cc
|
||||
--- xpdf-4.00/xpdf-qt/QtPDFCore.cc.permissions 2017-08-16 18:09:45.169489907 -0400
|
||||
+++ xpdf-4.00/xpdf-qt/QtPDFCore.cc 2017-08-16 18:10:14.375752439 -0400
|
||||
@@ -429,9 +429,11 @@ QString QtPDFCore::getSelectedTextQStrin
|
||||
QChar c;
|
||||
int i;
|
||||
|
||||
+#ifdef ENFORCE_PERMISSIONS
|
||||
if (!doc->okToCopy()) {
|
||||
return "";
|
||||
}
|
||||
+#endif
|
||||
if (!(s = getSelectedText())) {
|
||||
return "";
|
||||
}
|
||||
diff -up xpdf-4.00/xpdf-qt/XpdfWidget.cc.permissions xpdf-4.00/xpdf-qt/XpdfWidget.cc
|
||||
--- xpdf-4.00/xpdf-qt/XpdfWidget.cc.permissions 2017-08-16 18:12:40.775055809 -0400
|
||||
+++ xpdf-4.00/xpdf-qt/XpdfWidget.cc 2017-08-16 18:12:45.835928020 -0400
|
||||
@@ -1399,7 +1399,11 @@ bool XpdfWidget::okToExtractText() const
|
||||
if (!core->getDoc()) {
|
||||
return false;
|
||||
}
|
||||
+#ifdef ENFORCE_PERMISSIONS
|
||||
return (bool)core->getDoc()->okToCopy();
|
||||
+#else
|
||||
+ return true;
|
||||
+#endif
|
||||
} catch (GMemException e) {
|
||||
return false;
|
||||
}
|
||||
27
xpdf-4.00-versionedlib.patch
Normal file
27
xpdf-4.00-versionedlib.patch
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
diff -up xpdf-4.00/fofi/CMakeLists.txt.versionedlib xpdf-4.00/fofi/CMakeLists.txt
|
||||
--- xpdf-4.00/fofi/CMakeLists.txt.versionedlib 2017-08-08 19:22:50.000000000 -0400
|
||||
+++ xpdf-4.00/fofi/CMakeLists.txt 2017-08-16 20:06:18.106884951 -0400
|
||||
@@ -24,3 +24,5 @@ add_library(fofi_objs OBJECT
|
||||
add_library(fofi
|
||||
$<TARGET_OBJECTS:fofi_objs>
|
||||
)
|
||||
+
|
||||
+set_target_properties(fofi PROPERTIES VERSION 4 SOVERSION 4)
|
||||
diff -up xpdf-4.00/goo/CMakeLists.txt.versionedlib xpdf-4.00/goo/CMakeLists.txt
|
||||
--- xpdf-4.00/goo/CMakeLists.txt.versionedlib 2017-08-08 19:22:50.000000000 -0400
|
||||
+++ xpdf-4.00/goo/CMakeLists.txt 2017-08-16 20:06:00.525277924 -0400
|
||||
@@ -25,3 +25,5 @@ add_library(goo_objs OBJECT
|
||||
add_library(goo
|
||||
$<TARGET_OBJECTS:goo_objs>
|
||||
)
|
||||
+
|
||||
+set_target_properties(goo PROPERTIES VERSION 4 SOVERSION 4)
|
||||
diff -up xpdf-4.00/splash/CMakeLists.txt.versionedlib xpdf-4.00/splash/CMakeLists.txt
|
||||
--- xpdf-4.00/splash/CMakeLists.txt.versionedlib 2017-08-08 19:22:50.000000000 -0400
|
||||
+++ xpdf-4.00/splash/CMakeLists.txt 2017-08-16 20:06:41.204368689 -0400
|
||||
@@ -44,4 +44,5 @@ if (HAVE_SPLASH)
|
||||
add_library(splash
|
||||
$<TARGET_OBJECTS:splash_objs>
|
||||
)
|
||||
+ set_target_properties(splash PROPERTIES VERSION 4 SOVERSION 4)
|
||||
endif ()
|
||||
60
xpdf-4.01-64bit.patch
Normal file
60
xpdf-4.01-64bit.patch
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
diff -up xpdf-4.01/goo/gmem.cc.alloc xpdf-4.01/goo/gmem.cc
|
||||
--- xpdf-4.01/goo/gmem.cc.alloc 2019-02-18 13:24:19.000000000 -0500
|
||||
+++ xpdf-4.01/goo/gmem.cc 2019-02-22 09:37:02.683498383 -0500
|
||||
@@ -84,8 +84,8 @@ static size_t gMaxMemInUse = 0;
|
||||
#endif /* DEBUG_MEM */
|
||||
|
||||
#ifdef DEBUG_MEM
|
||||
-void *gmalloc(int size, int ignore) GMEM_EXCEP {
|
||||
- int size1;
|
||||
+void *gmalloc(size_t size, int ignore) GMEM_EXCEP {
|
||||
+ size_t size1;
|
||||
char *mem;
|
||||
GMemHdr *hdr;
|
||||
void *data;
|
||||
@@ -134,7 +134,7 @@ void *gmalloc(int size, int ignore) GMEM
|
||||
return data;
|
||||
}
|
||||
#else
|
||||
-void *gmalloc(int size) GMEM_EXCEP {
|
||||
+void *gmalloc(size_t size) GMEM_EXCEP {
|
||||
void *p;
|
||||
|
||||
if (size < 0) {
|
||||
@@ -150,11 +150,11 @@ void *gmalloc(int size) GMEM_EXCEP {
|
||||
}
|
||||
#endif
|
||||
|
||||
-void *grealloc(void *p, int size) GMEM_EXCEP {
|
||||
+void *grealloc(void *p, size_t size) GMEM_EXCEP {
|
||||
#ifdef DEBUG_MEM
|
||||
GMemHdr *hdr;
|
||||
void *q;
|
||||
- int oldSize;
|
||||
+ size_t oldSize;
|
||||
|
||||
if (size < 0) {
|
||||
gMemError("Invalid memory allocation size");
|
||||
diff -up xpdf-4.01/goo/gmem.h.alloc xpdf-4.01/goo/gmem.h
|
||||
--- xpdf-4.01/goo/gmem.h.alloc 2019-02-18 13:24:19.000000000 -0500
|
||||
+++ xpdf-4.01/goo/gmem.h 2019-02-22 09:37:02.683498383 -0500
|
||||
@@ -37,16 +37,16 @@ extern "C" {
|
||||
* returns NULL.
|
||||
*/
|
||||
#ifdef DEBUG_MEM
|
||||
-extern void *gmalloc(int size, int ignore = 0) GMEM_EXCEP;
|
||||
+extern void *gmalloc(size_t size, int ignore = 0) GMEM_EXCEP;
|
||||
#else
|
||||
-extern void *gmalloc(int size) GMEM_EXCEP;
|
||||
+extern void *gmalloc(size_t size) GMEM_EXCEP;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Same as realloc, but prints error message and exits if realloc()
|
||||
* returns NULL. If <p> is NULL, calls malloc instead of realloc().
|
||||
*/
|
||||
-extern void *grealloc(void *p, int size) GMEM_EXCEP;
|
||||
+extern void *grealloc(void *p, size_t size) GMEM_EXCEP;
|
||||
|
||||
/*
|
||||
* These are similar to gmalloc and grealloc, but take an object count
|
||||
21
xpdf-4.01-crash.patch
Normal file
21
xpdf-4.01-crash.patch
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
diff -up xpdf-4.01/fofi/FoFiType1.cc.crash xpdf-4.01/fofi/FoFiType1.cc
|
||||
--- xpdf-4.01/fofi/FoFiType1.cc.crash 2019-02-22 09:33:55.304458147 -0500
|
||||
+++ xpdf-4.01/fofi/FoFiType1.cc 2019-02-22 09:36:30.966169469 -0500
|
||||
@@ -276,9 +276,14 @@ void FoFiType1::parse() {
|
||||
p += 3;
|
||||
}
|
||||
} else {
|
||||
- if (strtok(buf, " \t") &&
|
||||
- (p = strtok(NULL, " \t\n\r")) && !strcmp(p, "def")) {
|
||||
- break;
|
||||
+ p = strtok(buf, " \t\n\r");
|
||||
+ if (p)
|
||||
+ {
|
||||
+ if (!strcmp(p, "def")) break;
|
||||
+ if (!strcmp(p, "readonly")) break;
|
||||
+ // the spec does not says this but i'm mantaining old xpdf behaviour that accepts "foo def" as end of the encoding array
|
||||
+ p = strtok(buf, " \t\n\r");
|
||||
+ if (p && !strcmp(p, "def")) break;
|
||||
}
|
||||
}
|
||||
}
|
||||
37
xpdf-4.01-ext.patch
Normal file
37
xpdf-4.01-ext.patch
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
diff -up xpdf-4.01/goo/gfile.cc.ext xpdf-4.01/goo/gfile.cc
|
||||
--- xpdf-4.01/goo/gfile.cc.ext 2019-02-18 13:24:19.000000000 -0500
|
||||
+++ xpdf-4.01/goo/gfile.cc 2019-02-22 09:33:17.023259251 -0500
|
||||
@@ -473,24 +473,6 @@ GBool openTempFile(GString **name, FILE
|
||||
char *s;
|
||||
int fd;
|
||||
|
||||
- if (ext) {
|
||||
-#if HAVE_MKSTEMPS
|
||||
- if ((s = getenv("TMPDIR"))) {
|
||||
- *name = new GString(s);
|
||||
- } else {
|
||||
- *name = new GString("/tmp");
|
||||
- }
|
||||
- (*name)->append("/XXXXXX")->append(ext);
|
||||
- fd = mkstemps((*name)->getCString(), (int)strlen(ext));
|
||||
-#else
|
||||
- if (!(s = tmpnam(NULL))) {
|
||||
- return gFalse;
|
||||
- }
|
||||
- *name = new GString(s);
|
||||
- (*name)->append(ext);
|
||||
- fd = open((*name)->getCString(), O_WRONLY | O_CREAT | O_EXCL, 0600);
|
||||
-#endif
|
||||
- } else {
|
||||
#if HAVE_MKSTEMP
|
||||
if ((s = getenv("TMPDIR"))) {
|
||||
*name = new GString(s);
|
||||
@@ -506,7 +488,7 @@ GBool openTempFile(GString **name, FILE
|
||||
*name = new GString(s);
|
||||
fd = open((*name)->getCString(), O_WRONLY | O_CREAT | O_EXCL, 0600);
|
||||
#endif // HAVE_MKSTEMP
|
||||
- }
|
||||
+
|
||||
if (fd < 0 || !(*f = fdopen(fd, mode))) {
|
||||
delete *name;
|
||||
*name = NULL;
|
||||
55
xpdf-4.01-urw-base35-fonts.patch
Normal file
55
xpdf-4.01-urw-base35-fonts.patch
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
diff -up xpdf-4.01/xpdf/GlobalParams.cc.urw-font-fix xpdf-4.01/xpdf/GlobalParams.cc
|
||||
--- xpdf-4.01/xpdf/GlobalParams.cc.urw-font-fix 2019-02-18 13:24:19.000000000 -0500
|
||||
+++ xpdf-4.01/xpdf/GlobalParams.cc 2019-02-22 09:44:56.842457771 -0500
|
||||
@@ -79,20 +79,20 @@ static struct {
|
||||
const char *obliqueFont; // name of font to oblique
|
||||
double obliqueFactor; // oblique sheer factor
|
||||
} displayFontTab[] = {
|
||||
- {"Courier", "n022003l.pfb", "cour.ttf", "Courier", "Courier", NULL, 0},
|
||||
- {"Courier-Bold", "n022004l.pfb", "courbd.ttf", "Courier", "Courier Bold", NULL, 0},
|
||||
- {"Courier-BoldOblique", "n022024l.pfb", "courbi.ttf", "Courier", "Courier Bold Oblique", "Courier-Bold", 0.212557},
|
||||
- {"Courier-Oblique", "n022023l.pfb", "couri.ttf", "Courier", "Courier Oblique", "Courier", 0.212557},
|
||||
- {"Helvetica", "n019003l.pfb", "arial.ttf", "Helvetica", "Helvetica", NULL, 0},
|
||||
- {"Helvetica-Bold", "n019004l.pfb", "arialbd.ttf", "Helvetica", "Helvetica-Bold", NULL, 0},
|
||||
- {"Helvetica-BoldOblique", "n019024l.pfb", "arialbi.ttf", "Helvetica", "Helvetica Bold Oblique", "Helvetica-Bold", 0.212557},
|
||||
- {"Helvetica-Oblique", "n019023l.pfb", "ariali.ttf", "Helvetica", "Helvetica Oblique", "Helvetica", 0.212557},
|
||||
- {"Symbol", "s050000l.pfb", NULL, "Symbol", "Symbol", NULL, 0},
|
||||
- {"Times-Bold", "n021004l.pfb", "timesbd.ttf", "Times", "Times-Bold", NULL, 0},
|
||||
- {"Times-BoldItalic", "n021024l.pfb", "timesbi.ttf", "Times", "Times-BoldItalic", NULL, 0},
|
||||
- {"Times-Italic", "n021023l.pfb", "timesi.ttf", "Times", "Times-Italic", NULL, 0},
|
||||
- {"Times-Roman", "n021003l.pfb", "times.ttf", "Times", "Times-Roman", NULL, 0},
|
||||
- {"ZapfDingbats", "d050000l.pfb", NULL, "ZapfDingbats", "Zapf Dingbats", NULL, 0},
|
||||
+ {"Courier", "NimbusMonoPS-Regular.t1", "cour.ttf", "Courier", "Courier", NULL, 0},
|
||||
+ {"Courier-Bold", "NimbusMonoPS-Bold.t1", "courbd.ttf", "Courier", "Courier Bold", NULL, 0},
|
||||
+ {"Courier-BoldOblique", "NimbusMonoPS-BoldItalic.t1", "courbi.ttf", "Courier", "Courier Bold Oblique", "Courier-Bold", 0.212557},
|
||||
+ {"Courier-Oblique", "NimbusMonoPS-Italic.t1", "couri.ttf", "Courier", "Courier Oblique", "Courier", 0.212557},
|
||||
+ {"Helvetica", "NimbusSans-Regular.t1", "arial.ttf", "Helvetica", "Helvetica", NULL, 0},
|
||||
+ {"Helvetica-Bold", "NimbusSans-Bold.t1", "arialbd.ttf", "Helvetica", "Helvetica-Bold", NULL, 0},
|
||||
+ {"Helvetica-BoldOblique", "NimbusSans-BoldItalic.t1", "arialbi.ttf", "Helvetica", "Helvetica Bold Oblique", "Helvetica-Bold", 0.212557},
|
||||
+ {"Helvetica-Oblique", "NimbusSans-Italic.t1", "ariali.ttf", "Helvetica", "Helvetica Oblique", "Helvetica", 0.212557},
|
||||
+ {"Symbol", "StandardSymbolsPS.t1", NULL, "Symbol", "Symbol", NULL, 0},
|
||||
+ {"Times-Bold", "NimbusRoman-Bold.t1", "timesbd.ttf", "Times", "Times-Bold", NULL, 0},
|
||||
+ {"Times-BoldItalic", "NimbusRoman-BoldItalic.t1", "timesbi.ttf", "Times", "Times-BoldItalic", NULL, 0},
|
||||
+ {"Times-Italic", "NimbusRoman-Italic.t1", "timesi.ttf", "Times", "Times-Italic", NULL, 0},
|
||||
+ {"Times-Roman", "NimbusRoman-Regular.t1", "times.ttf", "Times", "Times-Roman", NULL, 0},
|
||||
+ {"ZapfDingbats", "D050000L.t1", NULL, "ZapfDingbats", "Zapf Dingbats", NULL, 0},
|
||||
{NULL}
|
||||
};
|
||||
|
||||
@@ -104,6 +104,7 @@ static const char *displayFontDirs[] = {
|
||||
};
|
||||
#else
|
||||
static const char *displayFontDirs[] = {
|
||||
+ "/usr/share/fonts/urw-base35",
|
||||
"/usr/share/ghostscript/fonts",
|
||||
"/usr/local/share/ghostscript/fonts",
|
||||
"/usr/share/fonts/default/Type1",
|
||||
@@ -2204,7 +2205,7 @@ UnicodeRemapping *GlobalParams::getUnico
|
||||
}
|
||||
|
||||
GString *GlobalParams::findFontFile(GString *fontName) {
|
||||
- static const char *exts[] = { ".pfa", ".pfb", ".ttf", ".ttc", ".otf" };
|
||||
+ static const char *exts[] = { ".pfa", ".pfb", ".t1", ".ttf", ".ttc", ".otf" };
|
||||
GString *path, *dir;
|
||||
#ifdef _WIN32
|
||||
GString *fontNameU;
|
||||
79
xpdf-4.02-CVE-2019-12360.patch
Normal file
79
xpdf-4.02-CVE-2019-12360.patch
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
diff -up xpdf-4.02/fofi/FoFiTrueType.cc.CVE-2019-12360 xpdf-4.02/fofi/FoFiTrueType.cc
|
||||
--- xpdf-4.02/fofi/FoFiTrueType.cc.CVE-2019-12360 2020-06-26 15:15:48.156850534 -0400
|
||||
+++ xpdf-4.02/fofi/FoFiTrueType.cc 2020-06-26 15:15:35.204068577 -0400
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "gtypes.h"
|
||||
#include "gmem.h"
|
||||
#include "gmempp.h"
|
||||
+#include "GLikely.h"
|
||||
#include "GString.h"
|
||||
#include "GHash.h"
|
||||
#include "FoFiType1C.h"
|
||||
@@ -1764,7 +1765,7 @@ void FoFiTrueType::cvtSfnts(FoFiOutputFu
|
||||
GBool ok;
|
||||
Guint checksum;
|
||||
int nNewTables;
|
||||
- int glyfTableLen, length, pos, glyfPos, i, j, k;
|
||||
+ int glyfTableLen, length, pos, glyfPos, i, j, k, vmtxTabLength;
|
||||
Guchar vheaTab[36] = {
|
||||
0, 1, 0, 0, // table version number
|
||||
0, 0, // ascent
|
||||
@@ -1891,6 +1892,7 @@ void FoFiTrueType::cvtSfnts(FoFiOutputFu
|
||||
}
|
||||
}
|
||||
vmtxTab = NULL; // make gcc happy
|
||||
+ vmtxTabLength = 0;
|
||||
advance = 0; // make gcc happy
|
||||
if (needVerticalMetrics) {
|
||||
needVhea = seekTable("vhea") < 0;
|
||||
@@ -1951,6 +1953,7 @@ void FoFiTrueType::cvtSfnts(FoFiOutputFu
|
||||
checksum = computeTableChecksum(vheaTab, length);
|
||||
} else if (needVerticalMetrics && i == t42VmtxTable) {
|
||||
length = 4 + (nGlyphs - 1) * 2;
|
||||
+ vmtxTabLength = length;
|
||||
vmtxTab = (Guchar *)gmalloc(length);
|
||||
vmtxTab[0] = (Guchar)(advance / 256);
|
||||
vmtxTab[1] = (Guchar)(advance % 256);
|
||||
@@ -2065,8 +2068,16 @@ void FoFiTrueType::cvtSfnts(FoFiOutputFu
|
||||
dumpString(file + tables[j].offset, tables[j].len,
|
||||
outputFunc, outputStream);
|
||||
} else if (needVerticalMetrics && i == t42VheaTable) {
|
||||
+ if (unlikely(length > (int)sizeof(vheaTab))) {
|
||||
+ //~ error(errSyntaxWarning, -1, "length bigger than vheaTab size");
|
||||
+ length = sizeof(vheaTab);
|
||||
+ }
|
||||
dumpString(vheaTab, length, outputFunc, outputStream);
|
||||
} else if (needVerticalMetrics && i == t42VmtxTable) {
|
||||
+ if (unlikely(length > vmtxTabLength)) {
|
||||
+ //~ error(errSyntaxWarning, -1, "length bigger than vmtxTab size");
|
||||
+ length = vmtxTabLength;
|
||||
+ }
|
||||
dumpString(vmtxTab, length, outputFunc, outputStream);
|
||||
}
|
||||
}
|
||||
diff -up xpdf-4.02/goo/GLikely.h.CVE-2019-12360 xpdf-4.02/goo/GLikely.h
|
||||
--- xpdf-4.02/goo/GLikely.h.CVE-2019-12360 2020-06-26 15:11:32.839149675 -0400
|
||||
+++ xpdf-4.02/goo/GLikely.h 2020-06-26 15:11:07.713572773 -0400
|
||||
@@ -0,0 +1,22 @@
|
||||
+//========================================================================
|
||||
+//
|
||||
+// GLikely.h
|
||||
+//
|
||||
+// This file is licensed under the GPLv2 or later
|
||||
+//
|
||||
+// Copyright (C) 2008 Kees Cook <kees@outflux.net>
|
||||
+//
|
||||
+//========================================================================
|
||||
+
|
||||
+#ifndef GLIKELY_H
|
||||
+#define GLIKELY_H
|
||||
+
|
||||
+#if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__)
|
||||
+# define likely(x) __builtin_expect((x), 1)
|
||||
+# define unlikely(x) __builtin_expect((x), 0)
|
||||
+#else
|
||||
+# define likely(x) (x)
|
||||
+# define unlikely(x) (x)
|
||||
+#endif
|
||||
+
|
||||
+#endif
|
||||
19
xpdf-4.02-CVE-2019-17064.patch
Normal file
19
xpdf-4.02-CVE-2019-17064.patch
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
diff -up xpdf-4.02/xpdf/Catalog.cc.CVE-2019-17064 xpdf-4.02/xpdf/Catalog.cc
|
||||
--- xpdf-4.02/xpdf/Catalog.cc.CVE-2019-17064 2019-12-02 12:21:54.480562087 -0500
|
||||
+++ xpdf-4.02/xpdf/Catalog.cc 2019-12-02 12:22:37.047605136 -0500
|
||||
@@ -159,6 +159,7 @@ Catalog::Catalog(PDFDoc *docA) {
|
||||
baseURI = NULL;
|
||||
form = NULL;
|
||||
embeddedFiles = NULL;
|
||||
+ pageLabels = NULL;
|
||||
#if MULTITHREADED
|
||||
gInitMutex(&pageMutex);
|
||||
#endif
|
||||
@@ -241,7 +242,6 @@ Catalog::Catalog(PDFDoc *docA) {
|
||||
// get the ViewerPreferences object
|
||||
catDict.dictLookupNF("ViewerPreferences", &viewerPrefs);
|
||||
|
||||
- pageLabels = NULL;
|
||||
if (catDict.dictLookup("PageLabels", &obj)->isDict()) {
|
||||
readPageLabelTree(&obj);
|
||||
}
|
||||
12
xpdf-4.04-GlobalParams-null-fix.patch
Normal file
12
xpdf-4.04-GlobalParams-null-fix.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -up xpdf-4.04/xpdf/GlobalParams.h.null-fix xpdf-4.04/xpdf/GlobalParams.h
|
||||
--- xpdf-4.04/xpdf/GlobalParams.h.null-fix 2023-01-30 14:10:42.286805370 -0500
|
||||
+++ xpdf-4.04/xpdf/GlobalParams.h 2023-01-30 14:10:50.383895185 -0500
|
||||
@@ -237,7 +237,7 @@ public:
|
||||
|
||||
// Initialize the global parameters by attempting to read a config
|
||||
// file.
|
||||
- GlobalParams(const char *cfgFileName);
|
||||
+ GlobalParams(const char *cfgFileName = NULL);
|
||||
|
||||
~GlobalParams();
|
||||
|
||||
17
xpdf-4.04-shared-xpdf-lib.patch
Normal file
17
xpdf-4.04-shared-xpdf-lib.patch
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
diff -up xpdf-4.04/xpdf/CMakeLists.txt.shared-xpdf-lib xpdf-4.04/xpdf/CMakeLists.txt
|
||||
--- xpdf-4.04/xpdf/CMakeLists.txt.shared-xpdf-lib 2023-01-30 14:30:07.185779720 -0500
|
||||
+++ xpdf-4.04/xpdf/CMakeLists.txt 2023-01-30 14:31:41.942842314 -0500
|
||||
@@ -78,6 +78,13 @@ add_library(xpdf_objs OBJECT
|
||||
set_property(TARGET xpdf_objs
|
||||
PROPERTY POSITION_INDEPENDENT_CODE True)
|
||||
|
||||
+add_library(xpdfcore
|
||||
+ $<TARGET_OBJECTS:xpdf_objs>
|
||||
+)
|
||||
+
|
||||
+set_target_properties(xpdfcore PROPERTIES VERSION 4 SOVERSION 4)
|
||||
+
|
||||
+
|
||||
#--- object files needed by XpdfWidget
|
||||
|
||||
if ((QT4_FOUND OR Qt5Widgets_FOUND OR Qt6Widgets_FOUND)
|
||||
22
xpdf-4.05-CVE-2024-4141.patch
Normal file
22
xpdf-4.05-CVE-2024-4141.patch
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
diff -up xpdf-4.05/fofi/FoFiType1.cc.CVE-2024-4141 xpdf-4.05/fofi/FoFiType1.cc
|
||||
--- xpdf-4.05/fofi/FoFiType1.cc.CVE-2024-4141 2024-05-29 10:19:51.918225689 -0400
|
||||
+++ xpdf-4.05/fofi/FoFiType1.cc 2024-05-29 10:20:53.406160594 -0400
|
||||
@@ -193,7 +193,8 @@ void FoFiType1::parse() {
|
||||
char *line, *line1, *p, *p2;
|
||||
char buf[256];
|
||||
char c;
|
||||
- int n, code, base, i, j;
|
||||
+ unsigned int code;
|
||||
+ int n, base, i, j;
|
||||
GBool gotMatrix, startsWithDup, endsWithDup;
|
||||
|
||||
gotMatrix = gFalse;
|
||||
@@ -262,7 +263,7 @@ void FoFiType1::parse() {
|
||||
}
|
||||
++p;
|
||||
for (p2 = p; *p2 && *p2 != ' ' && *p2 != '\t'; ++p2) ;
|
||||
- if (code >= 0 && code < 256) {
|
||||
+ if (code < 256) {
|
||||
c = *p2;
|
||||
*p2 = '\0';
|
||||
gfree(encoding[code]);
|
||||
131
xpdf-4.06-permissions.patch
Normal file
131
xpdf-4.06-permissions.patch
Normal file
|
|
@ -0,0 +1,131 @@
|
|||
diff -up xpdf-4.06/xpdf/pdfimages.cc.permissions xpdf-4.06/xpdf/pdfimages.cc
|
||||
--- xpdf-4.06/xpdf/pdfimages.cc.permissions 2025-11-13 17:08:30.000000000 -0500
|
||||
+++ xpdf-4.06/xpdf/pdfimages.cc 2025-11-18 15:27:00.093784988 -0500
|
||||
@@ -4,6 +4,8 @@
|
||||
//
|
||||
// Copyright 1998-2003 Glyph & Cog, LLC
|
||||
//
|
||||
+// Modified for Debian by Hamish Moffatt, 22 May 2002.
|
||||
+//
|
||||
//========================================================================
|
||||
|
||||
#include <aconf.h>
|
||||
@@ -153,12 +155,14 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
// check for copy permission
|
||||
+#ifdef ENFORCE_PERMISSIONS
|
||||
if (!listOnly && !doc->okToCopy()) {
|
||||
error(errNotAllowed, -1,
|
||||
"Copying of images from this document is not allowed.");
|
||||
exitCode = 3;
|
||||
goto err1;
|
||||
}
|
||||
+#endif
|
||||
|
||||
// get page range
|
||||
if (firstPage < 1)
|
||||
diff -up xpdf-4.06/xpdf/pdftohtml.cc.permissions xpdf-4.06/xpdf/pdftohtml.cc
|
||||
--- xpdf-4.06/xpdf/pdftohtml.cc.permissions 2025-11-13 17:08:30.000000000 -0500
|
||||
+++ xpdf-4.06/xpdf/pdftohtml.cc 2025-11-18 15:25:43.149122766 -0500
|
||||
@@ -183,6 +183,7 @@ int main(int argc, char *argv[]) {
|
||||
goto err1;
|
||||
}
|
||||
|
||||
+#ifdef ENFORCE_PERMISSIONS
|
||||
// check for copy permission
|
||||
if (!doc->okToCopy()) {
|
||||
error(errNotAllowed, -1,
|
||||
@@ -190,6 +191,7 @@ int main(int argc, char *argv[]) {
|
||||
exitCode = 3;
|
||||
goto err1;
|
||||
}
|
||||
+#endif
|
||||
|
||||
// get page range
|
||||
if (firstPage < 1) {
|
||||
diff -up xpdf-4.06/xpdf/pdftops.cc.permissions xpdf-4.06/xpdf/pdftops.cc
|
||||
--- xpdf-4.06/xpdf/pdftops.cc.permissions 2025-11-13 17:08:30.000000000 -0500
|
||||
+++ xpdf-4.06/xpdf/pdftops.cc 2025-11-18 15:25:43.149260566 -0500
|
||||
@@ -4,6 +4,8 @@
|
||||
//
|
||||
// Copyright 1996-2003 Glyph & Cog, LLC
|
||||
//
|
||||
+// Modified for Debian by Hamish Moffatt, 22 May 2002.
|
||||
+//
|
||||
//========================================================================
|
||||
|
||||
#include <aconf.h>
|
||||
@@ -337,12 +339,14 @@ int main(int argc, char *argv[]) {
|
||||
goto err1;
|
||||
}
|
||||
|
||||
+#ifdef ENFORCE_PERMISSIONS
|
||||
// check for print permission
|
||||
if (!doc->okToPrint()) {
|
||||
error(errNotAllowed, -1, "Printing this document is not allowed.");
|
||||
exitCode = 3;
|
||||
goto err1;
|
||||
}
|
||||
+#endif
|
||||
|
||||
// construct PostScript file name
|
||||
if (argc == 3) {
|
||||
diff -up xpdf-4.06/xpdf/pdftotext.cc.permissions xpdf-4.06/xpdf/pdftotext.cc
|
||||
--- xpdf-4.06/xpdf/pdftotext.cc.permissions 2025-11-13 17:08:30.000000000 -0500
|
||||
+++ xpdf-4.06/xpdf/pdftotext.cc 2025-11-18 15:25:43.149380451 -0500
|
||||
@@ -4,6 +4,8 @@
|
||||
//
|
||||
// Copyright 1997-2013 Glyph & Cog, LLC
|
||||
//
|
||||
+// Modified for Debian by Hamish Moffatt, 22 May 2002.
|
||||
+//
|
||||
//========================================================================
|
||||
|
||||
#include <aconf.h>
|
||||
@@ -248,6 +250,7 @@ int main(int argc, char *argv[]) {
|
||||
goto err2;
|
||||
}
|
||||
|
||||
+#ifdef ENFORCE_PERMISSIONS
|
||||
// check for copy permission
|
||||
if (!doc->okToCopy()) {
|
||||
error(errNotAllowed, -1,
|
||||
@@ -255,6 +258,7 @@ int main(int argc, char *argv[]) {
|
||||
exitCode = 3;
|
||||
goto err2;
|
||||
}
|
||||
+#endif
|
||||
|
||||
// construct text file name
|
||||
if (argc == 3) {
|
||||
diff -up xpdf-4.06/xpdf-qt/QtPDFCore.cc.permissions xpdf-4.06/xpdf-qt/QtPDFCore.cc
|
||||
--- xpdf-4.06/xpdf-qt/QtPDFCore.cc.permissions 2025-11-13 17:08:30.000000000 -0500
|
||||
+++ xpdf-4.06/xpdf-qt/QtPDFCore.cc 2025-11-18 15:25:43.149536859 -0500
|
||||
@@ -494,9 +494,11 @@ QString QtPDFCore::getSelectedTextQStrin
|
||||
QString qs;
|
||||
int i;
|
||||
|
||||
+#ifdef ENFORCE_PERMISSIONS
|
||||
if (!doc->okToCopy()) {
|
||||
return "";
|
||||
}
|
||||
+#endif
|
||||
if (!(s = getSelectedText())) {
|
||||
return "";
|
||||
}
|
||||
diff -up xpdf-4.06/xpdf-qt/XpdfWidget.cc.permissions xpdf-4.06/xpdf-qt/XpdfWidget.cc
|
||||
--- xpdf-4.06/xpdf-qt/XpdfWidget.cc.permissions 2025-11-13 17:08:30.000000000 -0500
|
||||
+++ xpdf-4.06/xpdf-qt/XpdfWidget.cc 2025-11-18 15:25:43.149737940 -0500
|
||||
@@ -1526,7 +1526,11 @@ bool XpdfWidget::okToExtractText() const
|
||||
if (!core->getDoc()) {
|
||||
return false;
|
||||
}
|
||||
+#ifdef ENFORCE_PERMISSIONS
|
||||
return (bool)core->getDoc()->okToCopy();
|
||||
+#else
|
||||
+ return true;
|
||||
+#endif
|
||||
} catch (GMemException e) {
|
||||
return false;
|
||||
}
|
||||
133
xpdf-4.06-urw-base35-fonts.patch
Normal file
133
xpdf-4.06-urw-base35-fonts.patch
Normal file
|
|
@ -0,0 +1,133 @@
|
|||
diff -up xpdf-4.06/xpdf/GlobalParams.cc.urw-font-fix xpdf-4.06/xpdf/GlobalParams.cc
|
||||
--- xpdf-4.06/xpdf/GlobalParams.cc.urw-font-fix 2025-11-13 17:08:30.000000000 -0500
|
||||
+++ xpdf-4.06/xpdf/GlobalParams.cc 2025-11-18 15:23:11.114577091 -0500
|
||||
@@ -84,98 +84,98 @@ static struct {
|
||||
double obliqueFactor; // oblique sheer factor
|
||||
} displayFontTab[] = {
|
||||
{"Courier", // name
|
||||
- "n022003l.pfb", // t1FileName
|
||||
+ "NimbusMonoPS-Regular.t1", // t1FileName
|
||||
"cour.ttf", // ttFileName
|
||||
"Courier", "Courier", // macFileName, macFontName
|
||||
"NimbusMonoPS-Regular", // fcFontName
|
||||
NULL, 0 // obliqueFont, obliqueFactor
|
||||
},
|
||||
{"Courier-Bold", // name
|
||||
- "n022004l.pfb", // t1FileName
|
||||
+ "NimbusMonoPS-Bold.t1", // t1FileName
|
||||
"courbd.ttf", // ttFileName
|
||||
"Courier", "Courier Bold", // macFileName, macFontName
|
||||
"NimbusMonoPS-Bold", // fcFontName
|
||||
NULL, 0 // obliqueFont, obliqueFactor
|
||||
},
|
||||
{"Courier-BoldOblique", // name
|
||||
- "n022024l.pfb", // t1FileName
|
||||
+ "NimbusMonoPS-BoldItalic.t1", // t1FileName
|
||||
"courbi.ttf", // ttFileName
|
||||
"Courier", "Courier Bold Oblique", // macFileName, macFontName
|
||||
"NimbusMonoPS-BoldItalic", // fcFontName
|
||||
"Courier-Bold", 0.212557 // obliqueFont, obliqueFactor
|
||||
},
|
||||
{"Courier-Oblique", // name
|
||||
- "n022023l.pfb", // t1FileName
|
||||
+ "NimbusMonoPS-Italic.t1", // t1FileName
|
||||
"couri.ttf", // ttFileName
|
||||
"Courier", "Courier Oblique", // macFileName, macFontName
|
||||
"NimbusMonoPS-Italic", // fcFontName
|
||||
"Courier", 0.212557 // obliqueFont, obliqueFactor
|
||||
},
|
||||
{"Helvetica", // name
|
||||
- "n019003l.pfb", // t1FileName
|
||||
+ "NimbusSans-Regular.t1", // t1FileName
|
||||
"arial.ttf", // ttFileName
|
||||
"Helvetica", "Helvetica", // macFileName, macFontName
|
||||
"NimbusSans-Regular", // fcFontName
|
||||
NULL, 0 // obliqueFont, obliqueFactor
|
||||
},
|
||||
{"Helvetica-Bold", // name
|
||||
- "n019004l.pfb", // t1FileName
|
||||
+ "NimbusSans-Bold.t1", // t1FileName
|
||||
"arialbd.ttf", // ttFileName
|
||||
"Helvetica", "Helvetica Bold", // macFileName, macFontName
|
||||
"NimbusSans-Bold", // fcFontName
|
||||
NULL, 0 // obliqueFont, obliqueFactor
|
||||
},
|
||||
{"Helvetica-BoldOblique", // name
|
||||
- "n019024l.pfb", // t1FileName
|
||||
+ "NimbusSans-BoldItalic.t1", // t1FileName
|
||||
"arialbi.ttf", // ttFileName
|
||||
"Helvetica", "Helvetica Bold Oblique", // macFileName, macFontName
|
||||
"NimbusSans-BoldItalic", // fcFontName
|
||||
"Helvetica-Bold", 0.212557 // obliqueFont, obliqueFactor
|
||||
},
|
||||
{"Helvetica-Oblique", // name
|
||||
- "n019023l.pfb", // t1FileName
|
||||
+ "NimbusSans-Italic.t1", // t1FileName
|
||||
"ariali.ttf", // ttFileName
|
||||
"Helvetica", "Helvetica Oblique", // macFileName, macFontName
|
||||
"NimbusSans-Italic", // fcFontName
|
||||
"Helvetica", 0.212557 // obliqueFont, obliqueFactor
|
||||
},
|
||||
{"Symbol", // name
|
||||
- "s050000l.pfb", // t1FileName
|
||||
+ "StandardSymbolsPS.t1", // t1FileName
|
||||
NULL, // ttFileName
|
||||
"Symbol", "Symbol", // macFileName, macFontName
|
||||
"Standard Symbols PS", // fcFontName
|
||||
NULL, 0 // obliqueFont, obliqueFactor
|
||||
},
|
||||
{"Times-Bold", // name
|
||||
- "n021004l.pfb", // t1FileName
|
||||
+ "NimbusRoman-Bold.t1", // t1FileName
|
||||
"timesbd.ttf", // ttFileName
|
||||
"Times", "Times Bold", // macFileName, macFontName
|
||||
"NimbusRoman-Bold", // fcFontName
|
||||
NULL, 0 // obliqueFont, obliqueFactor
|
||||
},
|
||||
{"Times-BoldItalic", // name
|
||||
- "n021024l.pfb", // t1FileName
|
||||
+ "NimbusRoman-BoldItalic.t1", // t1FileName
|
||||
"timesbi.ttf", // ttFileName
|
||||
"Times", "Times Bold Italic", // macFileName, macFontName
|
||||
"NimbusRoman-BoldItalic", // fcFontName
|
||||
NULL, 0 // obliqueFont, obliqueFactor
|
||||
},
|
||||
{"Times-Italic", // name
|
||||
- "n021023l.pfb", // t1FileName
|
||||
+ "NimbusRoman-Italic.t1", // t1FileName
|
||||
"timesi.ttf", // ttFileName
|
||||
"Times", "Times Italic", // macFileName, macFontName
|
||||
"NimbusRoman-Italic", // fcFontName
|
||||
NULL, 0 // obliqueFont, obliqueFactor
|
||||
},
|
||||
{"Times-Roman", // name
|
||||
- "n021003l.pfb", // t1FileName
|
||||
+ "NimbusRoman-Regular.t1", // t1FileName
|
||||
"times.ttf", // ttFileName
|
||||
"Times", "Times Roman", // macFileName, macFontName
|
||||
"NimbusRoman-Regular", // fcFontName
|
||||
NULL, 0 // obliqueFont, obliqueFactor
|
||||
},
|
||||
{"ZapfDingbats", // name
|
||||
- "d050000l.pfb", // t1FileName
|
||||
+ "D050000L.t1", // t1FileName
|
||||
NULL, // ttFileName
|
||||
"ZapfDingbats", "Zapf Dingbats", // macFileName, macFontName
|
||||
"D050000L", // fcFontName
|
||||
@@ -192,6 +192,7 @@ static const char *displayFontDirs[] = {
|
||||
"c:/windows/fonts",
|
||||
"c:/winnt/fonts",
|
||||
#else // _WIN32
|
||||
+ "/usr/share/fonts/urw-base35",
|
||||
"/usr/share/ghostscript/fonts",
|
||||
"/usr/local/share/ghostscript/fonts",
|
||||
"/usr/share/fonts/default/Type1",
|
||||
@@ -2788,7 +2789,7 @@ UnicodeRemapping *GlobalParams::getUnico
|
||||
}
|
||||
|
||||
GString *GlobalParams::findFontFile(GString *fontName) {
|
||||
- static const char *exts[] = { ".pfa", ".pfb", ".ttf", ".ttc", ".otf" };
|
||||
+ static const char *exts[] = { ".pfa", ".pfb", ".t1", ".ttf", ".ttc", ".otf" };
|
||||
GString *path, *dir;
|
||||
#ifdef _WIN32
|
||||
GString *fontNameU;
|
||||
21
xpdf-fix-pdftopng-resolution.patch
Normal file
21
xpdf-fix-pdftopng-resolution.patch
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
--- c/xpdf/pdftopng.cc
|
||||
+++ c/xpdf/pdftopng.cc
|
||||
@@ -21,6 +21,8 @@
|
||||
#include "SplashOutputDev.h"
|
||||
#include "config.h"
|
||||
|
||||
+#define INCHESPERMETER 39.37007874
|
||||
+
|
||||
static int firstPage = 1;
|
||||
static int lastPage = 0;
|
||||
static int resolution = 150;
|
||||
@@ -261,6 +263,9 @@ static void setupPNG(png_structp *png, png_infop *pngInfo, FILE *f,
|
||||
png_set_IHDR(*png, *pngInfo, bitmap->getWidth(), bitmap->getHeight(),
|
||||
bitDepth, colorType, PNG_INTERLACE_NONE,
|
||||
PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
|
||||
+ png_set_pHYs(*png, *pngInfo, resolution*INCHESPERMETER, resolution*INCHESPERMETER,
|
||||
+ PNG_RESOLUTION_METER);
|
||||
+
|
||||
png_write_info(*png, *pngInfo);
|
||||
}
|
||||
|
||||
11
xpdf.desktop
11
xpdf.desktop
|
|
@ -1,6 +1,5 @@
|
|||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Categories=Application;Graphics;
|
||||
Categories=Graphics;
|
||||
X-Desktop-File-Install-Version=0.2
|
||||
Name=Xpdf PDF Viewer
|
||||
Name[sv]=Xpdf PDF-visare
|
||||
|
|
@ -8,8 +7,8 @@ Name[de]=Xpdf PDF-Betrachter
|
|||
Comment=View Adobe PDF (acrobat) files
|
||||
Comment[sv]=Visar Adobe PDF-filer (acrobat-filer)
|
||||
Comment[de]=PDF-Betrachter
|
||||
Exec=xpdf
|
||||
Terminal=0
|
||||
Exec=xpdf %f
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Icon=xpdf.png
|
||||
MimeType=application/pdf
|
||||
Icon=xpdf
|
||||
MimeType=application/pdf;
|
||||
|
|
|
|||
588
xpdf.spec
588
xpdf.spec
|
|
@ -1,56 +1,104 @@
|
|||
%undefine __cmake_in_source_build
|
||||
|
||||
Summary: A PDF file viewer for the X Window System
|
||||
Name: xpdf
|
||||
Version: 3.01
|
||||
Release: 27%{?dist}
|
||||
License: GPL
|
||||
Version: 4.06
|
||||
Release: 3%{?dist}
|
||||
License: (GPL-2.0-only OR GPL-3.0-only) AND BSD-3-Clause
|
||||
Epoch: 1
|
||||
Url: http://www.foolabs.com/xpdf/
|
||||
Group: Applications/Publishing
|
||||
Url: https://www.xpdfreader.com/
|
||||
|
||||
# There are some troublesome files named vms_*. We pull them out of the
|
||||
# tarball since we're not even using them on Linux.
|
||||
# Source0: ftp://ftp.foolabs.com/pub/xpdf/%{name}-%{version}.tar.gz
|
||||
Source0: %{name}-%{version}-novms.tar.gz
|
||||
# We have to pull the CMap files out due to non-free license.
|
||||
# Source3: ftp://ftp.foolabs.com/pub/xpdf/xpdf-chinese-simplified-2004-jul-27.tar.gz
|
||||
Source3: xpdf-chinese-simplified-2004-jul-27-NOCMAP.tar.gz
|
||||
# Source4: ftp://ftp.foolabs.com/pub/xpdf/xpdf-chinese-traditional-2004-jul-27.tar.gz
|
||||
Source4: xpdf-chinese-traditional-2004-jul-27-NOCMAP.tar.gz
|
||||
# Source5: ftp://ftp.foolabs.com/pub/xpdf/xpdf-japanese-2004-jul-27.tar.gz
|
||||
Source5: xpdf-japanese-2004-jul-27-NOCMAP.tar.gz
|
||||
# Source6: ftp://ftp.foolabs.com/pub/xpdf/xpdf-korean-2005-jul-07.tar.gz
|
||||
Source6: xpdf-korean-2005-jul-07-NOCMAP.tar.gz
|
||||
Source0: https://dl.xpdfreader.com/%{name}-%{version}.tar.gz
|
||||
Source1: https://dl.xpdfreader.com/%{name}-%{version}.tar.gz.sig
|
||||
Source2: https://www.xpdfreader.com/gpg-key.txt
|
||||
%if 0%{?fedora}
|
||||
# We have to pull the following CMap files out due to non-free license.
|
||||
# CMap/Adobe-GB1-UCS2
|
||||
# CMap/GBK-EUC-UCS2
|
||||
# CMap/GBpc-EUC-UCS2
|
||||
# CMap/GBpc-EUC-UCS2C
|
||||
# Source3: http://www.xpdfreader.com/dl/xpdf-chinese-simplified.tar.gz
|
||||
Source3: xpdf-chinese-simplified-2023-dec-05-NOCMAP.tar.gz
|
||||
# CMap/Adobe-CNS1-UCS2
|
||||
# CMap/B5pc-UCS2
|
||||
# CMap/B5pc-UCS2C
|
||||
# CMap/ETen-B5-UCS2
|
||||
# Source4: http://www.xpdfreader.com/dl/xpdf-chinese-traditional.tar.gz
|
||||
Source4: xpdf-chinese-traditional-2020-dec-22-NOCMAP.tar.gz
|
||||
# CMap/90ms-RKSJ-UCS2
|
||||
# CMap/90pv-RKSJ-UCS2
|
||||
# CMap/90pv-RKSJ-UCS2C
|
||||
# CMap/Adobe-Japan1-UCS2
|
||||
# Source5: http://www.xpdfreader.com/dl/xpdf-japanese.tar.gz
|
||||
Source5: xpdf-japanese-2020-dec-22-NOCMAP.tar.gz
|
||||
# CMap/Adobe-Korea1-UCS2
|
||||
# CMap/KSCms-UHC-UCS2
|
||||
# CMap/KSCpc-EUC-UCS2
|
||||
# CMap/KSCpc-EUC-UCS2C
|
||||
# Source6: http://www.xpdfreader.com/dl/xpdf-korean.tar.gz
|
||||
Source6: xpdf-korean-2023-dec-05-NOCMAP.tar.gz
|
||||
# cyrillic and thai don't have CMap files to worry about.
|
||||
Source7: ftp://ftp.foolabs.com/pub/xpdf/xpdf-cyrillic-2003-jun-28.tar.gz
|
||||
Source8: ftp://ftp.foolabs.com/pub/xpdf/xpdf-thai-2002-jan-16.tar.gz
|
||||
Source7: ftp://ftp.foolabs.com/pub/xpdf/xpdf-cyrillic-2011-aug-15.tar.gz
|
||||
# thai: 2025-08-13
|
||||
Source8: https://dl.xpdfreader.com/xpdf-thai.tar.gz
|
||||
Source10: xpdf.desktop
|
||||
Source11: xpdf.png
|
||||
Source12: ftp://ftp.foolabs.com/pub/xpdf/xpdf-arabic-2011-aug-15.tar.gz
|
||||
Source13: ftp://ftp.foolabs.com/pub/xpdf/xpdf-greek-2011-aug-15.tar.gz
|
||||
Source14: ftp://ftp.foolabs.com/pub/xpdf/xpdf-hebrew-2011-aug-15.tar.gz
|
||||
Source15: ftp://ftp.foolabs.com/pub/xpdf/xpdf-latin2-2011-aug-15.tar.gz
|
||||
Source16: ftp://ftp.foolabs.com/pub/xpdf/xpdf-turkish-2011-aug-15.tar.gz
|
||||
%endif
|
||||
|
||||
Patch0: xpdf-3.01-redhat-new.patch
|
||||
Patch3: xpdf-2.02-ext.patch
|
||||
Patch6: xpdf-3.00-core.patch
|
||||
Patch7: xpdf-3.00-xfont.patch
|
||||
Patch3: xpdf-4.01-ext.patch
|
||||
Patch9: xpdf-3.00-papersize.patch
|
||||
Patch10: xpdf-3.00-gcc4.patch
|
||||
Patch11: xpdf-3.01-crash.patch
|
||||
Patch12: xpdf-3.00-64bit.patch
|
||||
Patch13: xpdf-3.01-resize.patch
|
||||
Patch14: xpdf-3.01-freetype-internals.patch
|
||||
Patch15: xpdf-3.01-nocmap.patch
|
||||
Patch11: xpdf-4.01-crash.patch
|
||||
Patch12: xpdf-4.01-64bit.patch
|
||||
Patch15: xpdf-3.04-nocmap.patch
|
||||
Patch25: xpdf-4.00-versionedlib.patch
|
||||
Patch26: xpdf-4.06-urw-base35-fonts.patch
|
||||
Patch28: xpdf-4.04-GlobalParams-null-fix.patch
|
||||
# https://forum.xpdfreader.com/viewtopic.php?t=42521
|
||||
Patch29: xpdf-4.04-shared-xpdf-lib.patch
|
||||
|
||||
# Security patches
|
||||
# xpdf-3.01-CVE-2005-3191, CAN-2005-3193, CVE-2006-0301
|
||||
Patch100: xpdf-3.01pl2.patch
|
||||
# Based on
|
||||
# https://gitlab.freedesktop.org/poppler/poppler/commit/cdb7ad95f7c8fbf63ade040d8a07ec96467042fc
|
||||
# https://gitlab.freedesktop.org/poppler/poppler/commit/bf4aae25a244b1033a2479b9a8f633224f7d5de5
|
||||
Patch101: xpdf-4.02-CVE-2019-12360.patch
|
||||
# merged in 4.06
|
||||
# Patch102: xpdf-4.05-CVE-2024-4141.patch
|
||||
|
||||
# Debian patches
|
||||
Patch200: xpdf-4.06-permissions.patch
|
||||
# Proper stream encoding on 64bit platforms
|
||||
Patch203: fix-444648.dpatch
|
||||
|
||||
Requires: urw-fonts
|
||||
Requires: htmlview
|
||||
Requires: xpdf-utils
|
||||
Requires: xdg-utils
|
||||
Requires: poppler-utils
|
||||
Requires: xorg-x11-fonts-ISO8859-1-75dpi
|
||||
Requires: xorg-x11-fonts-ISO8859-1-100dpi
|
||||
Requires: qt5-qtsvg
|
||||
|
||||
BuildRequires: lesstif-devel
|
||||
%if 0%{?fedora}
|
||||
BuildRequires: qt5-qtbase-devel, cmake
|
||||
BuildRequires: freetype-devel >= 2.1.7
|
||||
BuildRequires: fontconfig-devel
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: t1lib-devel
|
||||
BuildRequires: libpaper-devel
|
||||
BuildRequires: libpng-devel
|
||||
BuildRequires: libXpm-devel
|
||||
BuildRequires: cups-devel
|
||||
%else
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: cmake
|
||||
BuildRequires: freetype-devel >= 2.1.7
|
||||
BuildRequires: fontconfig-devel
|
||||
BuildRequires: libpng-devel
|
||||
%endif
|
||||
# for %%gpgverify
|
||||
BuildRequires: gnupg2
|
||||
|
||||
Provides: %{name}-chinese-simplified = %{version}-%{release}
|
||||
Obsoletes: %{name}-chinese-simplified
|
||||
|
|
@ -61,33 +109,62 @@ Obsoletes: %{name}-korean
|
|||
Provides: %{name}-japanese = %{version}-%{release}
|
||||
Obsoletes: %{name}-japanese
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Requires: %{name}-libs%{_isa} = %{epoch}:%{version}-%{release}
|
||||
|
||||
%description
|
||||
Xpdf is an X Window System based viewer for Portable Document Format
|
||||
(PDF) files. Xpdf is a small and efficient program which uses
|
||||
standard X fonts.
|
||||
|
||||
%package devel
|
||||
%if 0%{?fedora}
|
||||
Requires: %{name}%{_isa} = %{epoch}:%{version}-%{release}
|
||||
Requires: libpaper-devel
|
||||
%endif
|
||||
Requires: fontconfig-devel, freetype-devel
|
||||
Requires: libpng-devel
|
||||
Summary: Development files for xpdf libraries
|
||||
|
||||
%description devel
|
||||
Development files for xpdf libraries.
|
||||
|
||||
%package libs
|
||||
Summary: Libraries from xpdf
|
||||
|
||||
%description libs
|
||||
Libraries from xpdf.
|
||||
|
||||
%prep
|
||||
%setup -q -a 3 -a 4 -a 5 -a 6 -a 7 -a 8
|
||||
%patch -p1
|
||||
%patch3 -p1 -b .ext
|
||||
%patch6 -p1 -b .core
|
||||
%patch7 -p1 -b .fonts
|
||||
%patch9 -p1 -b .papersize
|
||||
%patch10 -p1 -b .gcc4
|
||||
%patch11 -p1 -b .crash
|
||||
%patch12 -p1 -b .alloc
|
||||
%patch13 -p1 -b .resize
|
||||
%patch14 -p1 -b .freetype-internals
|
||||
%patch15 -p1 -b .nocmap
|
||||
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
|
||||
%if 0%{?fedora}
|
||||
%setup -q -a 3 -a 4 -a 5 -a 6 -a 7 -a 8 -a 12 -a 13 -a 14 -a 15 -a 16
|
||||
%else
|
||||
%setup -q
|
||||
%endif
|
||||
%patch -P3 -p1 -b .ext
|
||||
%patch -P9 -p1 -b .papersize
|
||||
%patch -P11 -p1 -b .crash
|
||||
%patch -P12 -p1 -b .alloc
|
||||
%patch -P25 -p1 -b .versionedlib
|
||||
%patch -P26 -p1 -b .urw-font-fix
|
||||
%patch -P28 -p1 -b .GlobalParams-null-fix
|
||||
%patch -P29 -p1 -b .shared-xpdf-lib
|
||||
|
||||
# security patches
|
||||
%patch100 -p1 -b .CVE-2005-3191_CAN-2005-3193_CVE-2006-0301
|
||||
%patch -P101 -p1 -b .CVE-2019-12360
|
||||
# %%patch -P102 -p1 -b .CVE-2024-4141
|
||||
|
||||
# debian patches
|
||||
%patch -P200 -p1 -b .permissions
|
||||
%patch -P203 -p1 -b .64bit-stream
|
||||
|
||||
# Comment out unused urlCommand option
|
||||
sed -i 's|urlCommand|#urlCommand|g' doc/sample-xpdfrc
|
||||
|
||||
%build
|
||||
find -name "*orig" | xargs rm -f
|
||||
|
||||
%if 0%{?fedora}
|
||||
# This may seem pointless, but in the unlikely event that _sysconfdir != /etc ...
|
||||
for file in doc/*.1 doc/*.5 xpdf-*/README; do
|
||||
sed -i -e 's:/etc/xpdfrc:%{_sysconfdir}/xpdfrc:g' $file
|
||||
|
|
@ -95,111 +172,452 @@ done
|
|||
# Same action for _datadir.
|
||||
for file in xpdf-*/README xpdf-*/add-to-xpdfrc; do
|
||||
sed -i -e 's:/usr/share/:%{_datadir}/:g' $file
|
||||
sed -i -e 's:/usr/local/share/:%{_datadir}/:g' $file
|
||||
done
|
||||
%endif
|
||||
|
||||
%configure \
|
||||
--enable-multithreaded \
|
||||
--enable-wordlist \
|
||||
--with-x \
|
||||
--with-gzip \
|
||||
--enable-opi \
|
||||
--with-appdef-dir=%{_datadir}/X11/app-defaults/ \
|
||||
--without-Xp-library \
|
||||
--with-t1-library \
|
||||
--with-freetype2-library=%{_libdir} \
|
||||
--with-freetype2-includes=%{_includedir}/freetype2
|
||||
export CFLAGS="%{optflags} -fPIC"
|
||||
export CXXFLAGS="%{optflags} -Wno-deprecated -fPIC"
|
||||
%cmake -DMULTITHREADED=ON -DOPI_SUPPORT=ON -DXPDFWIDGET_PRINTING=1 -DSYSTEM_XPDFRC="%{_sysconfdir}/xpdfrc" -DCMAKE_POLICY_VERSION_MINIMUM=3.5
|
||||
|
||||
make %{?_smp_mflags}
|
||||
make xpdf %{?_smp_mflags}
|
||||
%cmake_build
|
||||
%if 0%{?fedora}
|
||||
%cmake_build --target xpdf
|
||||
%endif
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/xpdf/chinese-simplified \
|
||||
%if 0%{?fedora}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/xpdf/arabic \
|
||||
$RPM_BUILD_ROOT%{_datadir}/xpdf/chinese-simplified \
|
||||
$RPM_BUILD_ROOT%{_datadir}/xpdf/chinese-traditional \
|
||||
$RPM_BUILD_ROOT%{_datadir}/xpdf/cyrillic \
|
||||
$RPM_BUILD_ROOT%{_datadir}/xpdf/greek \
|
||||
$RPM_BUILD_ROOT%{_datadir}/xpdf/hebrew \
|
||||
$RPM_BUILD_ROOT%{_datadir}/xpdf/japanese \
|
||||
$RPM_BUILD_ROOT%{_datadir}/xpdf/korean \
|
||||
$RPM_BUILD_ROOT%{_datadir}/xpdf/latin2 \
|
||||
$RPM_BUILD_ROOT%{_datadir}/xpdf/thai \
|
||||
$RPM_BUILD_ROOT%{_datadir}/xpdf/turkish \
|
||||
$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
|
||||
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
%cmake_install
|
||||
%endif
|
||||
|
||||
# Y U NO INSTALL LIBS?!?
|
||||
mkdir -p $RPM_BUILD_ROOT%{_libdir}
|
||||
cp -a %{_vpath_builddir}/fofi/libfofi.so* $RPM_BUILD_ROOT%{_libdir}
|
||||
cp -a %{_vpath_builddir}/goo/libgoo.so* $RPM_BUILD_ROOT%{_libdir}
|
||||
cp -a %{_vpath_builddir}/splash/libsplash.so* $RPM_BUILD_ROOT%{_libdir}
|
||||
cp -a %{_vpath_builddir}/xpdf/libxpdfcore.so* $RPM_BUILD_ROOT%{_libdir}
|
||||
|
||||
# headers
|
||||
mkdir -p $RPM_BUILD_ROOT%{_includedir}/xpdf/fofi
|
||||
mkdir -p $RPM_BUILD_ROOT%{_includedir}/xpdf/goo
|
||||
mkdir -p $RPM_BUILD_ROOT%{_includedir}/xpdf/splash
|
||||
cp -a fofi/*.h $RPM_BUILD_ROOT%{_includedir}/xpdf/fofi/
|
||||
cp -a goo/*.h $RPM_BUILD_ROOT%{_includedir}/xpdf/goo/
|
||||
cp -a splash/*.h $RPM_BUILD_ROOT%{_includedir}/xpdf/splash/
|
||||
cp -a xpdf/*.h $RPM_BUILD_ROOT%{_includedir}/xpdf/
|
||||
cp -a %{__cmake_builddir}/aconf.h $RPM_BUILD_ROOT%{_includedir}/xpdf/
|
||||
|
||||
%if 0%{?fedora}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications/
|
||||
%if 0%{?rhel} > 5 || 0%{?fedora}
|
||||
desktop-file-install \
|
||||
%else
|
||||
desktop-file-install --vendor "fedora" \
|
||||
%endif
|
||||
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
|
||||
--add-category X-Fedora \
|
||||
%{SOURCE10}
|
||||
install -m 0644 %{SOURCE11} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/xpdf.png
|
||||
|
||||
cp -pr xpdf-arabic/* $RPM_BUILD_ROOT%{_datadir}/xpdf/arabic/
|
||||
cp -pr xpdf-chinese-simplified/* $RPM_BUILD_ROOT%{_datadir}/xpdf/chinese-simplified/
|
||||
cp -pr xpdf-chinese-traditional/* $RPM_BUILD_ROOT%{_datadir}/xpdf/chinese-traditional/
|
||||
cp -pr xpdf-cyrillic/* $RPM_BUILD_ROOT%{_datadir}/xpdf/cyrillic/
|
||||
cp -pr xpdf-greek/* $RPM_BUILD_ROOT%{_datadir}/xpdf/greek/
|
||||
cp -pr xpdf-hebrew/* $RPM_BUILD_ROOT%{_datadir}/xpdf/hebrew/
|
||||
cp -pr xpdf-japanese/* $RPM_BUILD_ROOT%{_datadir}/xpdf/japanese/
|
||||
cp -pr xpdf-korean/* $RPM_BUILD_ROOT%{_datadir}/xpdf/korean/
|
||||
cp -pr xpdf-latin2/* $RPM_BUILD_ROOT%{_datadir}/xpdf/latin2/
|
||||
cp -pr xpdf-thai/* $RPM_BUILD_ROOT%{_datadir}/xpdf/thai/
|
||||
cp -pr xpdf-turkish/* $RPM_BUILD_ROOT%{_datadir}/xpdf/turkish/
|
||||
|
||||
# poppler provides all utilities now
|
||||
# http://bugzilla.redhat.com/bugzillA/SHow_bug.cgi?id=177446
|
||||
# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=219032
|
||||
%if 0%{?rhel} > 6 || 0%{?fedora}
|
||||
rm $RPM_BUILD_ROOT%{_bindir}/pdfdetach
|
||||
%endif
|
||||
rm $RPM_BUILD_ROOT%{_bindir}/pdffonts
|
||||
rm $RPM_BUILD_ROOT%{_bindir}/pdfimages
|
||||
rm $RPM_BUILD_ROOT%{_bindir}/pdfinfo
|
||||
rm $RPM_BUILD_ROOT%{_bindir}/pdftohtml
|
||||
rm $RPM_BUILD_ROOT%{_bindir}/pdftops
|
||||
rm $RPM_BUILD_ROOT%{_bindir}/pdftotext
|
||||
%if 0%{?rhel} > 5 || 0%{?fedora} > 6
|
||||
rm $RPM_BUILD_ROOT%{_bindir}/pdftoppm
|
||||
|
||||
rm $RPM_BUILD_ROOT%{_mandir}/man1/pdftoppm.1*
|
||||
%endif
|
||||
%if 0%{?rhel} > 6 || 0%{?fedora}
|
||||
rm $RPM_BUILD_ROOT%{_mandir}/man1/pdfdetach.1*
|
||||
%endif
|
||||
rm $RPM_BUILD_ROOT%{_mandir}/man1/pdffonts.1*
|
||||
rm $RPM_BUILD_ROOT%{_mandir}/man1/pdfimages.1*
|
||||
rm $RPM_BUILD_ROOT%{_mandir}/man1/pdfinfo.1*
|
||||
rm $RPM_BUILD_ROOT%{_mandir}/man1/pdftohtml.1*
|
||||
rm $RPM_BUILD_ROOT%{_mandir}/man1/pdftops.1*
|
||||
rm $RPM_BUILD_ROOT%{_mandir}/man1/pdftotext.1*
|
||||
rm $RPM_BUILD_ROOT%{_mandir}/man1/pdftoppm.1*
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/xpdf/
|
||||
for i in chinese-simplified chinese-traditional cyrillic japanese korean thai; do
|
||||
for i in arabic chinese-simplified chinese-traditional cyrillic greek hebrew japanese korean latin2 thai turkish; do
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/%{name}/$i/README README.$i
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/%{name}/$i/add-to-xpdfrc $RPM_BUILD_ROOT%{_sysconfdir}/xpdf/add-to-xpdfrc.$i
|
||||
done
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
# xpdfrc cleanup
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/
|
||||
cp -a doc/sample-xpdfrc $RPM_BUILD_ROOT%{_sysconfdir}/xpdfrc
|
||||
sed -i -e 's:/usr/local/share/:%{_datadir}/:g' $RPM_BUILD_ROOT%{_sysconfdir}/xpdfrc
|
||||
%endif
|
||||
|
||||
%post
|
||||
touch --no-create %{_datadir}/icons/hicolor || :
|
||||
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
|
||||
update-desktop-database &> /dev/null ||:
|
||||
|
||||
%postun
|
||||
touch --no-create %{_datadir}/icons/hicolor || :
|
||||
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
|
||||
update-desktop-database &> /dev/null ||:
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%if 0%{?fedora}
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%license COPYING COPYING3
|
||||
%doc CHANGES README README.*
|
||||
%{_bindir}/xpdf
|
||||
%{_bindir}/pdftopng
|
||||
%{_libdir}/lib*.so.*
|
||||
%{_mandir}/man?/pdftopng*
|
||||
%{_mandir}/man?/xpdf*
|
||||
%if 0%{?rhel} > 5 || 0%{?fedora} > 6
|
||||
# Do Nothing.
|
||||
%else
|
||||
%{_bindir}/pdftoppm
|
||||
%{_mandir}/man?/pdftoppm*
|
||||
%endif
|
||||
%if 0%{?rhel}
|
||||
%if 0%{?rhel} < 7
|
||||
%{_bindir}/pdfdetach
|
||||
%{_mandir}/man?/pdfdetach*
|
||||
%endif
|
||||
%endif
|
||||
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/xpdfrc
|
||||
%dir %{_sysconfdir}/xpdf
|
||||
%lang(ar) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/xpdf/add-to-xpdfrc.arabic
|
||||
%lang(zh_CN) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/xpdf/add-to-xpdfrc.chinese-simplified
|
||||
%lang(zh_TW) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/xpdf/add-to-xpdfrc.chinese-traditional
|
||||
%lang(el) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/xpdf/add-to-xpdfrc.greek
|
||||
%lang(iw) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/xpdf/add-to-xpdfrc.hebrew
|
||||
%lang(ja) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/xpdf/add-to-xpdfrc.japanese
|
||||
%lang(ko) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/xpdf/add-to-xpdfrc.korean
|
||||
%lang(th) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/xpdf/add-to-xpdfrc.thai
|
||||
# cyrillic is not a lang, many languages are cyrillic
|
||||
%lang(tr) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/xpdf/add-to-xpdfrc.turkish
|
||||
# cyrillic and latin2 are not langs, many languages are cyrillic/latin2
|
||||
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/xpdf/add-to-xpdfrc.cyrillic
|
||||
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/xpdf/add-to-xpdfrc.latin2
|
||||
%{_datadir}/icons/hicolor/48x48/apps/xpdf.png
|
||||
%dir %{_datadir}/xpdf
|
||||
%{_datadir}/applications/*
|
||||
%lang(ar) %{_datadir}/xpdf/arabic
|
||||
%lang(zh_CN) %{_datadir}/xpdf/chinese-simplified
|
||||
%lang(zh_TW) %{_datadir}/xpdf/chinese-traditional
|
||||
%lang(el) %{_datadir}/xpdf/greek
|
||||
%lang(iw) %{_datadir}/xpdf/hebrew
|
||||
%lang(ja) %{_datadir}/xpdf/japanese
|
||||
%lang(ko) %{_datadir}/xpdf/korean
|
||||
%lang(th) %{_datadir}/xpdf/thai
|
||||
%lang(tr) %{_datadir}/xpdf/turkish
|
||||
%{_datadir}/xpdf/cyrillic
|
||||
%{_datadir}/xpdf/latin2
|
||||
%endif
|
||||
|
||||
%files devel
|
||||
%{_includedir}/xpdf/
|
||||
%{_libdir}/lib*.so
|
||||
|
||||
%files libs
|
||||
%{_libdir}/lib*.so.*
|
||||
|
||||
%changelog
|
||||
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.06-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
|
||||
|
||||
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.06-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
|
||||
|
||||
* Tue Nov 18 2025 Tom Callaway <spot@fedoraproject.org> - 1:4.06-1
|
||||
- update to 4.06
|
||||
|
||||
* Thu Jul 31 2025 Tom Callaway <spot@fedoraproject.org> - 1:4.05-8
|
||||
- passing -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to fix FTBFS with CMake4 (bz2381643)
|
||||
|
||||
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.05-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.05-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.05-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Wed May 29 2024 Tom Callaway <spot@fedoraproject.org> - 4.05-4
|
||||
- apply fix for CVE-2024-4141, thanks to Petr Gajdos and Derek Noonburg
|
||||
|
||||
* Fri Apr 5 2024 Peter Lemenkov <lemenkov@gmail.com> - 4.05-3
|
||||
- Verify GPG signature
|
||||
|
||||
* Thu Feb 29 2024 Tom Callaway <spot@fedoraproject.org> - 4.05-2
|
||||
- update langpacks
|
||||
|
||||
* Tue Feb 27 2024 Than Ngo <than@redhat.com> - 4.05-1
|
||||
- fixed bz#2263444, update to 4.05
|
||||
|
||||
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.04-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.04-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Fri Jun 16 2023 Than Ngo <than@redhat.com> - 1:4.04-9
|
||||
- added ELN/RHEL conditions
|
||||
|
||||
* Fri Apr 28 2023 Tom Callaway <spot@fedoraproject.org> 1:4.04-8
|
||||
- move libs to -libs subpackage to minimize dep footprint of texlive-pdftex (bz2188328)
|
||||
|
||||
* Tue Feb 21 2023 Than Ngo <than@redhat.com> - 4.04-7
|
||||
- migrated to SPDX license
|
||||
|
||||
* Thu Feb 16 2023 Tom Callaway <spot@fedoraproject.org> - 1:4.04-6
|
||||
- drop now unnecessary libpaper2 patch
|
||||
|
||||
* Mon Jan 30 2023 Tom Callaway <spot@fedoraproject.org> - 1:4.04-5
|
||||
- pull in all the headers
|
||||
- apply null fix for default var in GlobalParams()
|
||||
- make a libxpdfcore for texlive-base to use
|
||||
|
||||
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.04-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Sun Jan 8 2023 Tom Callaway <spot@fedoraproject.org> - 1:4.04-3
|
||||
- fix build with libpaper2, rebuild for it
|
||||
|
||||
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.04-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Fri Apr 22 2022 Tom Callaway <spot@fedoraproject.org> - 1:4.04-1
|
||||
- update to 4.04
|
||||
|
||||
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.03-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.03-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Tue Feb 2 2021 Tom Callaway <spot@fedoraproject.org> - 1:4.03-1
|
||||
- update to 4.03
|
||||
|
||||
* Thu Jan 28 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.02-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.02-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Fri Jun 26 2020 Tom Callaway <spot@fedoraproject.org> - 1:4.02-4
|
||||
- generate and apply fix based on poppler fix for CVE-2019-12360
|
||||
|
||||
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.02-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Mon Dec 2 2019 Tom Callaway <spot@fedoraproject.org> - 1:4.02-2
|
||||
- apply upstream fix for CVE-2019-17064
|
||||
|
||||
* Wed Oct 16 2019 Tom Callaway <spot@fedoraproject.org> - 1:4.02-1
|
||||
- update to 4.02
|
||||
|
||||
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.01-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Fri Feb 22 2019 Tom Callaway <spot@fedoraproject.org> 1:4.01-1
|
||||
- update to 4.01
|
||||
|
||||
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.00-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.00-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Mon Apr 30 2018 Tom Callaway <spot@fedoraproject.org> - 1:4.00-7
|
||||
- add Requires: qt5-qtsvg to ensure icons are shown
|
||||
|
||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.00-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Mon Nov 27 2017 Tom Callaway <spot@fedoraproject.org> - 1:4.00-5
|
||||
- enable printing support. I hate cmake. thanks to Henrique Martins.
|
||||
|
||||
* Mon Nov 13 2017 Tom Callaway <spot@fedoraproject.org> - 1:4.00-4
|
||||
- tell xpdf where to find the system copy of xpdfrc
|
||||
- comment out unused urlCommand option from xpdfrc
|
||||
|
||||
* Tue Nov 7 2017 Tom Callaway <spot@fedoraproject.org> - 1:4.00-3
|
||||
- fix URW font handling (thanks to Yaakov Selkowitz)
|
||||
|
||||
* Wed Aug 23 2017 Tom Callaway <spot@fedoraproject.org> 1:4.00-2
|
||||
- fix macro typo
|
||||
|
||||
* Wed Aug 16 2017 Tom Callaway <spot@fedoraproject.org> 1:4.00-1
|
||||
- update to 4.00
|
||||
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.04-15
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.04-14
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.04-13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.04-12
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
* Mon Jul 27 2015 Tom Callaway <spot@fedoraproject.org> - 1:3.04-11
|
||||
- fix output resolution of png file output (thanks to Kevin Farshaw, bz1246666)
|
||||
|
||||
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.04-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
* Mon May 11 2015 Tom Callaway <spot@fedoraproject.org> - 1:3.04-9
|
||||
- RHEL 7 does not need pdfdetach
|
||||
|
||||
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 1:3.04-8
|
||||
- Rebuilt for GCC 5 C++11 ABI change
|
||||
|
||||
* Mon Jan 12 2015 Tom Callaway <spot@fedoraproject.org> - 1:3.04-7
|
||||
- add BR: libXpm-devel, drop --with-gzip (no longer exists)
|
||||
|
||||
* Tue Dec 2 2014 Tom Callaway <spot@fedoraproject.org> - 1:3.04-6
|
||||
- fix proper display of international strings in the title (bz 1169301)
|
||||
|
||||
* Fri Sep 12 2014 Tom Callaway <spot@fedoraproject.org> - 1:3.04-5
|
||||
- fix .desktop file
|
||||
|
||||
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.04-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||
|
||||
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.04-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||
|
||||
* Tue Jun 3 2014 Tom Callaway <spot@fedoraproject.org> - 1:3.04-2
|
||||
- fix "sharexpdf" typo in lang configs
|
||||
|
||||
* Thu May 29 2014 Tom Callaway <spot@fedoraproject.org> - 1:3.04-1
|
||||
- update to 3.04
|
||||
- update all patches, langpacks
|
||||
- use motif instead of lesstif where possible
|
||||
- fix pdftopng to install (not in poppler right now)
|
||||
|
||||
* Sun Sep 22 2013 Tom Callaway <spot@fedoraproject.org> - 1:3.03-8.1
|
||||
- rhel still needs pdfdetach in xpdf
|
||||
|
||||
* Sun Sep 22 2013 Tom Callaway <spot@fedoraproject.org> - 1:3.03-8
|
||||
- fix CVE-2012-2142
|
||||
- fix issue with icon name in .desktop file (except on el5)
|
||||
|
||||
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.03-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||
|
||||
* Sun Feb 10 2013 Parag Nemade <paragn AT fedoraproject DOT org> - 1:3.03-6
|
||||
- Remove vendor tag from desktop file as per https://fedorahosted.org/fesco/ticket/1077
|
||||
|
||||
* Wed Nov 14 2012 Tom Callaway <spot@fedoraproject.org> - 1:3.03-5
|
||||
- fix desktop file to invoke xpdf with a file param (bz874644)
|
||||
|
||||
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.03-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
* Fri May 25 2012 Tom Callaway <spot@fedoraproject.org> - 1:3.03-3
|
||||
- drop pdfdetach, poppler-utils has it now
|
||||
|
||||
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.03-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||
|
||||
* Mon Aug 22 2011 Tom Callaway <spot@fedoraproject.org> - 1:3.03-1
|
||||
- update to 3.03
|
||||
|
||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.02-18
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
* Fri Jan 21 2011 Tom Callaway <spot@fedoraproject.org> - 1:3.02-17
|
||||
- Added pdftoppm for el5 or older, since it is not included in poppler-utils on el5
|
||||
- Thanks to Ingvar Hagelund.
|
||||
|
||||
* Fri Oct 22 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 1:3.02-16
|
||||
- apply xpdf-3.02pl5 security patch to fix:
|
||||
CVE-2010-3702, CVS-2010-3704
|
||||
|
||||
* Fri Oct 16 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 1:3.02-15
|
||||
- apply xpdf-3.02pl4 security patch to fix:
|
||||
CVE-2009-3603, CVE-2009-3604, CVE-2009-3605, CVE-2009-3606
|
||||
CVE-2009-3608, CVE-2009-3609
|
||||
|
||||
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.02-14
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
||||
|
||||
* Thu Apr 16 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 1:3.02-13
|
||||
- apply xpdf-3.02pl3 security patch to fix:
|
||||
CVE-2009-0799, CVE-2009-0800, CVE-2009-1179, CVE-2009-1180
|
||||
CVE-2009-1181, CVE-2009-1182, CVE-2009-1183
|
||||
|
||||
* Wed Mar 4 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 1:3.02-12
|
||||
- add Requires: xorg-x11-fonts-ISO8859-1-100dpi (bz 485404)
|
||||
|
||||
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.02-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
||||
|
||||
* Wed Feb 11 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 1:3.02-10
|
||||
- cleanup crash patch a bit (bz 483664)
|
||||
- improve support for more mouse buttons (bz 483669)
|
||||
|
||||
* Wed Dec 10 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1:3.02-9
|
||||
- apply debian patches
|
||||
|
||||
* Sun Sep 21 2008 Ville Skyttä <ville.skytta at iki.fi> - 1:3.02-8
|
||||
- Fix Patch0:/%%patch mismatch.
|
||||
|
||||
* Thu Jun 19 2008 Tom "spot" Callaway <tcallawa@redhat.com> 1:3.02-7
|
||||
- add missing Requires: xorg-x11-fonts-ISO8859-1-75dpi
|
||||
|
||||
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1:3.02-6
|
||||
- Autorebuild for GCC 4.3
|
||||
|
||||
* Wed Jan 2 2008 Tom "spot" Callaway <tcallawa@redhat.com> 1:3.02-5
|
||||
- use xdg-utils instead of htmlview (bz 313311)
|
||||
|
||||
* Fri Nov 9 2007 Tom "spot" Callaway <tcallawa@redhat.com> 1:3.02-4
|
||||
- resolve 372461, 372471, 372481
|
||||
|
||||
* Tue Aug 28 2007 Tom "spot" Callaway <tcallawa@redhat.com> 1:3.02-3
|
||||
- fix PDF printing on x86_64 (bz 253601)
|
||||
- add mouse buttons 8 and 9 (bz 255401)
|
||||
- add extra zoom types (bz 251855)
|
||||
- rebuild for BuildID
|
||||
|
||||
* Mon Aug 6 2007 Tom "spot" Callaway <tcallawa@redhat.com> 1:3.02-2
|
||||
- fix font list parsing to squelch noise (bz 250709)
|
||||
- cleanup add-to-xpdfrc files, update xpdfrc to include them by default
|
||||
|
||||
* Wed Aug 1 2007 Tom "spot" Callaway <tcallawa@redhat.com> 1:3.02-1
|
||||
- bump to 3.02
|
||||
- patch in security fix
|
||||
- add arabic, greek, hebrew, latin2, turkish lang support
|
||||
|
||||
* Mon Dec 18 2006 Tom "spot" Callaway <tcallawa@redhat.com> 1:3.01-28
|
||||
- Requires: poppler-utils
|
||||
|
||||
* Thu Dec 14 2006 Tom "spot" Callaway <tcallawa@redhat.com> 1:3.01-27
|
||||
- drop the xpdf-utils subpackage, poppler-utils ate it all
|
||||
|
||||
|
|
@ -492,7 +910,7 @@ update-desktop-database &> /dev/null ||:
|
|||
* Sun Mar 17 2002 Than Ngo <than@redhat.com> 1.00-3
|
||||
- rebuild
|
||||
|
||||
* Wed Feb 21 2002 Than Ngo <than@redhat.com> 1.00-2
|
||||
* Thu Feb 21 2002 Than Ngo <than@redhat.com> 1.00-2
|
||||
- fix Bad 'urlCommand' (bug #59730)
|
||||
|
||||
* Tue Feb 05 2002 Than Ngo <than@redhat.com> 1.00-1
|
||||
|
|
@ -547,7 +965,7 @@ update-desktop-database &> /dev/null ||:
|
|||
* Thu Jul 13 2000 Prospector <bugzilla@redhat.com>
|
||||
- automatic rebuild
|
||||
|
||||
* Tue Jul 2 2000 Jakub Jelinek <jakub@redhat.com>
|
||||
* Sun Jul 2 2000 Jakub Jelinek <jakub@redhat.com>
|
||||
- Rebuild with new C++
|
||||
|
||||
* Fri Jun 16 2000 Than Ngo <than@redhat.de>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue