blob: 3e6c65699d6f47948ce706d7bb0d41974277cba2 [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001From 7755e67116e8973ee0e3b22d653df026a84fa01b Mon Sep 17 00:00:00 2001
2From: Chris Liddell <chris.liddell@artifex.com>
3Date: Thu, 15 Jun 2017 08:58:31 +0100
4Subject: [PATCH] Bug 698055: bounds check zone pointer in Ins_MDRP
5
6---
7 base/ttinterp.c | 3 ++-
8 1 file changed, 2 insertions(+), 1 deletion(-)
9
10--- end of original header
11
12CVE: CVE-2017-9726
13
14Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git]
15
16Signed-off-by: Joe Slater <joe.slater@windriver.com>
17diff --git a/base/ttinterp.c b/base/ttinterp.c
18index e7c9d68..af457e8 100644
19--- a/base/ttinterp.c
20+++ b/base/ttinterp.c
21@@ -3770,7 +3770,8 @@ static int nInstrCount=0;
22
23 point = (Int)args[0];
24
25- if ( BOUNDS( args[0], CUR.zp1.n_points ) )
26+ if ( BOUNDS( args[0], CUR.zp1.n_points ) ||
27+ BOUNDS( CUR.GS.rp0, CUR.zp0.n_points) )
28 {
29 /* Current version of FreeType silently ignores this out of bounds error
30 * and drops the instruction, see bug #691121
31--
321.7.9.5
33