aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorcy <cy@FreeBSD.org>2019-10-05 06:12:43 +0800
committercy <cy@FreeBSD.org>2019-10-05 06:12:43 +0800
commitcfa0c47562da4dc265f5f97a0582e76e58f5cb99 (patch)
treebb295d91fc65f419207a8ce7bc7c7635e23ee38f /graphics
parent77930c2df14144e57cecd8d0c057d4d61231aabd (diff)
downloadfreebsd-ports-gnome-cfa0c47562da4dc265f5f97a0582e76e58f5cb99.tar.gz
freebsd-ports-gnome-cfa0c47562da4dc265f5f97a0582e76e58f5cb99.tar.zst
freebsd-ports-gnome-cfa0c47562da4dc265f5f97a0582e76e58f5cb99.zip
Backport fix for CVE-2019-16927 and CVE-2019-9877 from xpdf4.
PR: 241066 Submitted by: naddy MFH: 2019Q4
Diffstat (limited to 'graphics')
-rw-r--r--graphics/xpdf3/Makefile2
-rw-r--r--graphics/xpdf3/files/patch-xpdf_TextOutputDev.cc15
2 files changed, 16 insertions, 1 deletions
diff --git a/graphics/xpdf3/Makefile b/graphics/xpdf3/Makefile
index 459fcecc5b32..6fafbe7d1809 100644
--- a/graphics/xpdf3/Makefile
+++ b/graphics/xpdf3/Makefile
@@ -2,7 +2,7 @@
PORTNAME= xpdf
PORTVERSION= 3.04
-PORTREVISION= 10
+PORTREVISION= 11
CATEGORIES= graphics print
MASTER_SITES= https://xpdfreader-dl.s3.amazonaws.com/old/
.if !defined(MASTERDIR)
diff --git a/graphics/xpdf3/files/patch-xpdf_TextOutputDev.cc b/graphics/xpdf3/files/patch-xpdf_TextOutputDev.cc
new file mode 100644
index 000000000000..fa6976d9fb32
--- /dev/null
+++ b/graphics/xpdf3/files/patch-xpdf_TextOutputDev.cc
@@ -0,0 +1,15 @@
+--- xpdf/TextOutputDev.cc.orig 2019-10-04 19:39:06 UTC
++++ xpdf/TextOutputDev.cc
+@@ -2472,6 +2472,12 @@ TextBlock *TextPage::split(GList *charsA, int rot) {
+
+ //----- compute the horizontal and vertical profiles
+
++ if (xMin / splitPrecision < 0.5 * INT_MIN ||
++ xMax / splitPrecision > 0.5 * INT_MAX ||
++ yMin / splitPrecision < 0.5 * INT_MIN ||
++ xMax / splitPrecision > 0.5 * INT_MAX) {
++ return NULL;
++ }
+ // add some slack to the array bounds to avoid floating point
+ // precision problems
+ xMinI = (int)floor(xMin / splitPrecision) - 1;