ghostscript/CVE-2016-7977.patch
Johannes Meixner 2e708fde52 Accepting request 435738 from home:jsmeix:branches:Printing
Ghostscript security update that fixes (CVE-2013-5653 is already fixed in the 9.20 sources) CVE-2016-7976 CVE-2016-7977 CVE-2016-7978 CVE-2016-7979 (all bsc#1001951) and CVE-2016-8602 (bsc#1004237)

OBS-URL: https://build.opensuse.org/request/show/435738
OBS-URL: https://build.opensuse.org/package/show/Printing/ghostscript?expand=0&rev=72
2016-10-17 12:34:08 +00:00

26 lines
981 B
Diff

From: Chris Liddell <chris.liddell@artifex.com>
Date: Mon, 3 Oct 2016 00:46:28 +0000 (+0100)
Subject: Bug 697169: Be rigorous with SAFER permissions
X-Git-Url: http://git.ghostscript.com/?p=user%2Fchrisl%2Fghostpdl.git;a=commitdiff_plain;h=cf046d2f0fa2c6973c6ca8d582a9b185cc4bd280;hp=3826c0c7a4fc781c8222ef458b706360600f1711
Bug 697169: Be rigorous with SAFER permissions
Once we've opened our input file from the command line, enforce the SAFER
rules.
---
diff --git a/psi/zfile.c b/psi/zfile.c
index b6caea2..2c6c958 100644
--- a/psi/zfile.c
+++ b/psi/zfile.c
@@ -1081,6 +1081,9 @@ lib_file_open(gs_file_path_ptr lib_path, const gs_memory_t *mem, i_ctx_t *i_ctx
gs_main_instance *minst = get_minst_from_memory(mem);
int code;
+ if (i_ctx_p && starting_arg_file)
+ i_ctx_p->starting_arg_file = false;
+
/* when starting arg files (@ files) iodev_default is not yet set */
if (iodev == 0)
iodev = (gx_io_device *)gx_io_device_table[0];