summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-7977.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/ghostscript/ghostscript/CVE-2016-7977.patch')
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/CVE-2016-7977.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-7977.patch b/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-7977.patch
new file mode 100644
index 0000000000..b7eed1241e
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-7977.patch
@@ -0,0 +1,33 @@
1From 8abd22010eb4db0fb1b10e430d5f5d83e015ef70 Mon Sep 17 00:00:00 2001
2From: Chris Liddell <chris.liddell@artifex.com>
3Date: Mon, 3 Oct 2016 01:46:28 +0100
4Subject: [PATCH] Bug 697169: Be rigorous with SAFER permissions
5
6Once we've opened our input file from the command line, enforce the SAFER
7rules.
8
9Upstream-Status: Backport
10CVE: CVE-2016-7977
11
12Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
13---
14 psi/zfile.c | 3 +++
15 1 file changed, 3 insertions(+)
16
17diff --git a/psi/zfile.c b/psi/zfile.c
18index b6caea2..2c6c958 100644
19--- a/psi/zfile.c
20+++ b/psi/zfile.c
21@@ -1081,6 +1081,9 @@ lib_file_open(gs_file_path_ptr lib_path, const gs_memory_t *mem, i_ctx_t *i_ctx
22 gs_main_instance *minst = get_minst_from_memory(mem);
23 int code;
24
25+ if (i_ctx_p && starting_arg_file)
26+ i_ctx_p->starting_arg_file = false;
27+
28 /* when starting arg files (@ files) iodev_default is not yet set */
29 if (iodev == 0)
30 iodev = (gx_io_device *)gx_io_device_table[0];
31--
322.10.2
33