summaryrefslogtreecommitdiff
path: root/print
diff options
context:
space:
mode:
authorleot <leot@pkgsrc.org>2016-08-03 08:50:17 +0000
committerleot <leot@pkgsrc.org>2016-08-03 08:50:17 +0000
commit295bb76345a5440554e373c31b1f23b8c723484d (patch)
treeb67d49524f94697c6ba5bb6ed17f87e3b6de4edf /print
parent42341f2107e55fca2fb07d5e42d9876dc3de2cc9 (diff)
downloadpkgsrc-295bb76345a5440554e373c31b1f23b8c723484d.tar.gz
Fix possible heap corruption (via upstream bug 696954).
Bump PKGREVISION
Diffstat (limited to 'print')
-rw-r--r--print/mupdf/Makefile4
-rw-r--r--print/mupdf/distinfo3
-rw-r--r--print/mupdf/patches/patch-source_pdf_pdf-shade.c15
3 files changed, 19 insertions, 3 deletions
diff --git a/print/mupdf/Makefile b/print/mupdf/Makefile
index 3fafb7ce6f3..35387f70a6c 100644
--- a/print/mupdf/Makefile
+++ b/print/mupdf/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.38 2016/07/22 15:42:38 leot Exp $
+# $NetBSD: Makefile,v 1.39 2016/08/03 08:50:17 leot Exp $
DISTNAME= mupdf-1.9a-source
PKGNAME= ${DISTNAME:S/-source//}
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= print
MASTER_SITES= http://mupdf.com/downloads/archive/
diff --git a/print/mupdf/distinfo b/print/mupdf/distinfo
index 3eda7b0950b..521d1c7336c 100644
--- a/print/mupdf/distinfo
+++ b/print/mupdf/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.26 2016/07/22 15:42:38 leot Exp $
+$NetBSD: distinfo,v 1.27 2016/08/03 08:50:17 leot Exp $
SHA1 (mupdf-1.9a-source.tar.gz) = f2b3c21e5060d6ec56ea0d0c32b0feac7eac0e5f
RMD160 (mupdf-1.9a-source.tar.gz) = 0cb0d098c603b16be217e42299052a928d95c3fc
@@ -9,5 +9,6 @@ SHA1 (patch-ab) = c1ee4dd0b79aa0d905c0a0b634fbd016c063cd64
SHA1 (patch-ac) = 51b62ef8ff3e6c44ad954b2405bd982f9d682d37
SHA1 (patch-ae) = c6b113818b32cb4470e8549c00a16e0b2f364ede
SHA1 (patch-source_fitz_load-jpx.c) = cb33828a6ca638c1b61ff017708a41cc586d1b0e
+SHA1 (patch-source_pdf_pdf-shade.c) = 9baba48f468e0827b77c25c05b226c763cf4975f
SHA1 (patch-source_pdf_pdf-xref.c) = 406c7a664b7171eb5ca7c5a09aac6be549a8fbb5
SHA1 (patch-thirdparty_mujs_Makefile) = f1da7cdf2c9e2e4bbac3e80ef486204a39b27e34
diff --git a/print/mupdf/patches/patch-source_pdf_pdf-shade.c b/print/mupdf/patches/patch-source_pdf_pdf-shade.c
new file mode 100644
index 00000000000..15161742fef
--- /dev/null
+++ b/print/mupdf/patches/patch-source_pdf_pdf-shade.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-source_pdf_pdf-shade.c,v 1.1 2016/08/03 08:50:17 leot Exp $
+
+Fix possible heap corruption vulnerability (via upstream bug 696954).
+
+--- source/pdf/pdf-shade.c.orig 2016-04-21 11:14:32.000000000 +0000
++++ source/pdf/pdf-shade.c
+@@ -206,7 +206,7 @@ pdf_load_mesh_params(fz_context *ctx, pd
+ obj = pdf_dict_get(ctx, dict, PDF_NAME_Decode);
+ if (pdf_array_len(ctx, obj) >= 6)
+ {
+- n = (pdf_array_len(ctx, obj) - 4) / 2;
++ n = fz_mini(FZ_MAX_COLORS, (pdf_array_len(ctx, obj) - 4) / 2);
+ shade->u.m.x0 = pdf_to_real(ctx, pdf_array_get(ctx, obj, 0));
+ shade->u.m.x1 = pdf_to_real(ctx, pdf_array_get(ctx, obj, 1));
+ shade->u.m.y0 = pdf_to_real(ctx, pdf_array_get(ctx, obj, 2));