summary refs log tree commit diff
path: root/gnu/packages/patches/mupdf-CVE-2017-15587.patch
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2017-11-19 15:01:00 +0100
committerMarius Bakke <mbakke@fastmail.com>2017-11-19 15:01:00 +0100
commit2dd12924cf4a30a96262b6d392fcde58c9f10d4b (patch)
tree3f74f5426ff214a02b8f6652f6516979657a7f98 /gnu/packages/patches/mupdf-CVE-2017-15587.patch
parent259b4f34ba2eaefeafdb7c9f9eb56ee77f16010c (diff)
parenta93447b89a5b132221072e729d13a3f17391b8c2 (diff)
downloadguix-2dd12924cf4a30a96262b6d392fcde58c9f10d4b.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/patches/mupdf-CVE-2017-15587.patch')
-rw-r--r--gnu/packages/patches/mupdf-CVE-2017-15587.patch10
1 files changed, 7 insertions, 3 deletions
diff --git a/gnu/packages/patches/mupdf-CVE-2017-15587.patch b/gnu/packages/patches/mupdf-CVE-2017-15587.patch
index 5da7737ea1..7d24666756 100644
--- a/gnu/packages/patches/mupdf-CVE-2017-15587.patch
+++ b/gnu/packages/patches/mupdf-CVE-2017-15587.patch
@@ -3,11 +3,12 @@ Fix CVE-2017-15587.
 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-15587
 https://nandynarwhals.org/CVE-2017-15587/
 
-Copied from upstream:
+This patch is these two upstream commits squashed together:
 <https://git.ghostscript.com/?p=mupdf.git;h=82df2631d7d0446b206ea6b434ea609b6c28b0e8>
+<https://git.ghostscript.com/?p=mupdf.git;h=d18bc728e46c5a5708f14d27c2b6c44e1d0c3232>
 
 diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c
-index 66bd0ed..6292793 100644
+index 66bd0ed8..89499e61 100644
 --- a/source/pdf/pdf-xref.c
 +++ b/source/pdf/pdf-xref.c
 @@ -924,7 +924,7 @@ pdf_read_new_xref_section(fz_context *ctx, pdf_document *doc, fz_stream *stm, fz
@@ -15,7 +16,10 @@ index 66bd0ed..6292793 100644
  	int i, n;
  
 -	if (i0 < 0 || i1 < 0)
-+	if (i0 < 0 || i1 < 0 || (i0+i1) < 0)
++	if (i0 < 0 || i1 < 0 || i0 > INT_MAX - i1)
  		fz_throw(ctx, FZ_ERROR_GENERIC, "negative xref stream entry index");
  	//if (i0 + i1 > pdf_xref_len(ctx, doc))
  	//	fz_throw(ctx, FZ_ERROR_GENERIC, "xref stream has too many entries");
+-- 
+2.15.0
+