summary refs log tree commit diff
path: root/gnu/packages/patches/mupdf-CVE-2016-7505.patch
blob: 15e4f374d6094e3f9df4901f90d2ec8dc88076f1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Fix CVE-2016-7505:

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-7505
http://bugs.ghostscript.com/show_bug.cgi?id=697140

Patch copied from upstream source repository:
http://git.ghostscript.com/?p=mujs.git;a=commitdiff;h=8c805b4eb19cf2af689c860b77e6111d2ee439d5

From 8c805b4eb19cf2af689c860b77e6111d2ee439d5 Mon Sep 17 00:00:00 2001
From: Tor Andersson <tor.andersson@artifex.com>
Date: Wed, 21 Sep 2016 15:21:04 +0200
Subject: [PATCH] Fix bug 697140: Overflow check in ascii division in strtod.

---
 jsdtoa.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/jsdtoa.c b/jsdtoa.c
index 2e52368..920c1a7 100644
--- a/thirdparty/mujs/jsdtoa.c
+++ b/thirdparty/mujs/jsdtoa.c
@@ -735,6 +735,7 @@ xx:
 		n -= c<<b;
 		*p++ = c + '0';
 		(*na)++;
+		if (*na >= Ndig) break; /* abort if overflowing */
 	}
 	*p = 0;
 }
-- 
2.10.2