Sophie

Sophie

distrib > Mageia > 6 > armv7hl > media > core-updates-src > by-pkgid > bc219369320b6b5781eed48254462cef > files > 33

ghostscript-9.25-1.2.mga6.src.rpm

From f1a078763387dde6972b30ee55a4b985d4d130bb Mon Sep 17 00:00:00 2001
From: Chris Liddell <chris.liddell@artifex.com>
Date: Tue, 9 Oct 2018 15:34:59 +0100
Subject: [PATCH] Explicitly exclude /unknownerror from the SAFERERRORLIST

Since we remove /unknownerror from errordict, we want to exclude it from the
list we copy to gserrordict for SAFERERRORS
---
 Resource/Init/gs_init.ps | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Resource/Init/gs_init.ps b/Resource/Init/gs_init.ps
index 173afea..521cc65 100644
--- a/Resource/Init/gs_init.ps
+++ b/Resource/Init/gs_init.ps
@@ -1160,7 +1160,13 @@ errordict /unknownerror .undef
 % Put all the requested handlers in gserrordict
   gserrordict
   //.SAFERERRORLIST
-  {dup errordict exch get 2 index 3 1 roll put} forall
+  {
+    dup /unknownerror eq
+    {pop}
+    {
+      dup errordict exch get 2 index 3 1 roll put
+    }ifelse
+  }forall
   noaccess pop
   systemdict /.setsafeerrors .forceundef
   systemdict /.SAFERERRORLIST .forceundef
-- 
2.9.1