Blame SOURCES/ghostscript-cve-2019-3839.patch

6bfa55
From 95aa78beae9489d5c9f898fe2032aa23f860867d Mon Sep 17 00:00:00 2001
6bfa55
From: Ray Johnston <ray.johnston@artifex.com>
6bfa55
Date: Fri, 21 Sep 2018 11:16:18 -0700
6bfa55
Subject: [PATCH 1/6] Catch errors in setpagesize, .setpagesize and
6bfa55
 setpagedevice and cleanup
6bfa55
6bfa55
Bug 699794 showed that attempt to change page size in SAFER mode when the
6bfa55
nulldevice was the currentdevice would leave 'false' on the stack. Run
6bfa55
.setdevice in stopped and clean up, and also clean up .setpagesize
6bfa55
---
6bfa55
 Resource/Init/gs_lev2.ps  |  9 ++++++++-
6bfa55
 Resource/Init/gs_setpd.ps |  9 +++++++--
6bfa55
 Resource/Init/gs_statd.ps | 22 ++++++++++++++++++----
6bfa55
 3 files changed, 33 insertions(+), 7 deletions(-)
6bfa55
6bfa55
diff --git a/Resource/Init/gs_lev2.ps b/Resource/Init/gs_lev2.ps
6bfa55
index b69303d..ab0c32e 100644
6bfa55
--- a/Resource/Init/gs_lev2.ps
6bfa55
+++ b/Resource/Init/gs_lev2.ps
6bfa55
@@ -616,7 +616,14 @@ currentuserparams /WaitTimeout known
6bfa55
    .dicttomark setpagedevice
6bfa55
    /WaitTimeout exch mark /JobTimeout 5 2 roll .dicttomark setsystemparams
6bfa55
  } bind def
6bfa55
-/.setpagesize { 2 array astore /PageSize .dict1 setpagedevice } bind def
6bfa55
+/.setpagesize
6bfa55
+ { 2 copy 2 array astore /PageSize .dict1 { setpagedevice } stopped {
6bfa55
+     pop	% the setpagedevice dict
6bfa55
+     /setpagesize $error /errorname get signalerror
6bfa55
+   } {
6bfa55
+     pop pop	% success -- pop the arguments
6bfa55
+   } ifelse
6bfa55
+ } bind def
6bfa55
 /setduplexmode { /Duplex .dict1 setpagedevice } bind def
6bfa55
 /setmargins
6bfa55
  { exch 2 array astore /Margins .dict1 setpagedevice
6bfa55
diff --git a/Resource/Init/gs_setpd.ps b/Resource/Init/gs_setpd.ps
6bfa55
index 46e5810..7875d1f 100644
6bfa55
--- a/Resource/Init/gs_setpd.ps
6bfa55
+++ b/Resource/Init/gs_setpd.ps
6bfa55
@@ -932,10 +932,15 @@ SETPDDEBUG { (Recovering.) = pstack flush } if
6bfa55
                 % Stack: mark ... <merged> <failed> <device> <eraseflag>
6bfa55
 SETPDDEBUG { (Installing.) = pstack flush } if
6bfa55
 
6bfa55
-    pop
6bfa55
+   pop
6bfa55
                 % .setdevice clears the current page device!
6bfa55
    .currentpagedevice pop exch
6bfa55
-   .setdevice pop
6bfa55
+   { .setdevice } stopped {
6bfa55
+     cleartomark exch pop
6bfa55
+     /setpagedevice $error /errorname get
6bfa55
+     signalerror
6bfa55
+   } if
6bfa55
+   pop
6bfa55
    .setpagedevice
6bfa55
 
6bfa55
                 % Implement UseCIEColor directly if this is a LL3 system.
6bfa55
diff --git a/Resource/Init/gs_statd.ps b/Resource/Init/gs_statd.ps
6bfa55
index 64c6463..34b759c 100644
6bfa55
--- a/Resource/Init/gs_statd.ps
6bfa55
+++ b/Resource/Init/gs_statd.ps
6bfa55
@@ -39,7 +39,13 @@ statusdict begin
6bfa55
 % These procedures are also accessed as data structures during initialization,
6bfa55
 % so the page dimensions must be the first two elements of the procedure.
6bfa55
 
6bfa55
-/.setpagesize { /statusdict .systemvar begin .setpagesize end } bind def
6bfa55
+/.setpagesize {
6bfa55
+   /statusdict .systemvar begin
6bfa55
+   { .setpagesize } stopped {
6bfa55
+     /setpagesize $error /errorname get signalerror
6bfa55
+   } if
6bfa55
+   end
6bfa55
+} bind def
6bfa55
 
6bfa55
                 % Page sizes defined by Adobe documentation
6bfa55
                 % Note: these executable arrays should all begin with two
6bfa55
@@ -261,9 +267,17 @@ readonly def
6bfa55
                 % The Adobe documentation only defines setpagetype
6bfa55
                 % (a Level 1 operator) as accepting the values 0 and 1,
6bfa55
                 % so we do too.
6bfa55
-      {/letter /note} 1 index get
6bfa55
-      //systemdict /userdict get exch get cvx exec
6bfa55
-      /pagetype exch def
6bfa55
+      dup type /integertype ne {
6bfa55
+        /setpage /typecheck signalerror
6bfa55
+      } {
6bfa55
+        dup 0 ne 1 index 1 ne or {
6bfa55
+          /setpage /rangecheck signalerror
6bfa55
+        } {
6bfa55
+          {/letter /note} 1 index get
6bfa55
+          //systemdict /userdict get exch get cvx exec
6bfa55
+        } ifelse
6bfa55
+        /pagetype exch def
6bfa55
+    } ifelse
6bfa55
     end
6bfa55
   } bind def
6bfa55
 
6bfa55
-- 
6bfa55
2.20.1
6bfa55
6bfa55
6bfa55
From c29ec2fff76e45bbf9cd767ff541556c5d064be4 Mon Sep 17 00:00:00 2001
6bfa55
From: Ray Johnston <ray.johnston@artifex.com>
6bfa55
Date: Fri, 21 Sep 2018 12:00:50 -0700
6bfa55
Subject: [PATCH 2/6] Add parameter checking in setresolution
6bfa55
6bfa55
Found in sequence for bug 699794
6bfa55
---
6bfa55
 Resource/Init/gs_lev2.ps | 9 ++++++++-
6bfa55
 1 file changed, 8 insertions(+), 1 deletion(-)
6bfa55
6bfa55
diff --git a/Resource/Init/gs_lev2.ps b/Resource/Init/gs_lev2.ps
6bfa55
index ab0c32e..0f0d573 100644
6bfa55
--- a/Resource/Init/gs_lev2.ps
6bfa55
+++ b/Resource/Init/gs_lev2.ps
6bfa55
@@ -637,7 +637,14 @@ currentuserparams /WaitTimeout known
6bfa55
    .dicttomark setpagedevice
6bfa55
  } bind def
6bfa55
 /setresolution
6bfa55
- { dup 2 array astore /HWResolution .dict1 setpagedevice
6bfa55
+ { count 1 lt { /setresolution /stackunderflow signalerror } if
6bfa55
+   dup type dup /integertype eq exch /realtype eq or not
6bfa55
+   {
6bfa55
+      /setresolution /typecheck signalerror
6bfa55
+   } if
6bfa55
+   dup 2 array astore /HWResolution .dict1 { setpagedevice } stopped {
6bfa55
+     pop /setresolution $error /errorname get signalerror
6bfa55
+   } if
6bfa55
  } bind def
6bfa55
 %END PAGEDEVICE
6bfa55
 
6bfa55
-- 
6bfa55
2.20.1
6bfa55
6bfa55
6bfa55
From fe4c47d8e25d6366ecbb5ff487348148b908a89e Mon Sep 17 00:00:00 2001
6bfa55
From: Nancy Durgin <nancy.durgin@artifex.com>
6bfa55
Date: Tue, 13 Nov 2018 14:23:41 -0800
6bfa55
Subject: [PATCH 3/6] Undefine some level2-related operators
6bfa55
6bfa55
These are only a partial set.  Undefine them in both the level2dict and
6bfa55
systemdict.  They are undef'd in gs_init.ps because they are used outside
6bfa55
the scope of just gs_lev2.ps
6bfa55
6bfa55
      /.execform1
6bfa55
      /.getdevparams
6bfa55
      /.setuserparams2
6bfa55
      /.startjob
6bfa55
      /.checkFilePermitparams
6bfa55
      /.checksetparams
6bfa55
      /.copyparam
6bfa55
      /.setpagesize
6bfa55
6bfa55
Rename .dict1 to .pair2dict and use immediate reference.
6bfa55
6bfa55
Undef these at end of gs_lev2.ps (should never make it into systemdict):
6bfa55
      /.pair2dict
6bfa55
      /.checkprocesscomment
6bfa55
---
6bfa55
 Resource/Init/gs_init.ps | 18 ++++++++++++++++++
6bfa55
 Resource/Init/gs_lev2.ps | 34 +++++++++++++++++++++-------------
6bfa55
 2 files changed, 39 insertions(+), 13 deletions(-)
6bfa55
6bfa55
diff --git a/Resource/Init/gs_init.ps b/Resource/Init/gs_init.ps
6bfa55
index 48bb96d..e915f11 100644
6bfa55
--- a/Resource/Init/gs_init.ps
6bfa55
+++ b/Resource/Init/gs_init.ps
6bfa55
@@ -2271,6 +2271,24 @@ SAFER { .setsafeglobal } if
6bfa55
   ]
6bfa55
   {systemdict exch .forceundef} forall
6bfa55
 
6bfa55
+  % level 2 operators, undefine from both systemdict and level2dict
6bfa55
+  [
6bfa55
+      /.execform1
6bfa55
+      /.getdevparams
6bfa55
+      /.setuserparams2
6bfa55
+      /.startjob
6bfa55
+      /.checkFilePermitparams
6bfa55
+      /.checksetparams
6bfa55
+      /.copyparam
6bfa55
+      /.setpagesize
6bfa55
+
6bfa55
+% Couldn't figure out how to do these yet
6bfa55
+%      /.checkparamtype
6bfa55
+%      /.startnewjob
6bfa55
+  ]
6bfa55
+  dup {level2dict exch .forceundef} forall
6bfa55
+  {systemdict exch .forceundef} forall
6bfa55
+
6bfa55
   //systemdict /UndefinePostScriptOperators .forceundef
6bfa55
 } .bind executeonly def % must be bound and hidden for .forceundef
6bfa55
 
6bfa55
diff --git a/Resource/Init/gs_lev2.ps b/Resource/Init/gs_lev2.ps
6bfa55
index 0f0d573..e6f0645 100644
6bfa55
--- a/Resource/Init/gs_lev2.ps
6bfa55
+++ b/Resource/Init/gs_lev2.ps
6bfa55
@@ -64,7 +64,7 @@ level2dict begin
6bfa55
       pop
6bfa55
     } ifelse pop pop
6bfa55
   } forall pop pop
6bfa55
-} .bind def	% not odef, shouldn't reset stacks
6bfa55
+} .bind odef
6bfa55
 
6bfa55
 % currentuser/systemparams creates and returns a dictionary in the
6bfa55
 % current VM.  The easiest way to make this work is to copy any composite
6bfa55
@@ -101,7 +101,7 @@ level2dict begin
6bfa55
     1 index length string exch .setglobal
6bfa55
     copy exch not { readonly } if
6bfa55
   } if
6bfa55
-} .bind def
6bfa55
+} .bind odef
6bfa55
 
6bfa55
 % Some user parameters are managed entirely at the PostScript level.
6bfa55
 % We take care of that here.
6bfa55
@@ -345,13 +345,13 @@ end
6bfa55
   } ifelse
6bfa55
 } .bind def
6bfa55
 /ProcessComment //null .definepsuserparam
6bfa55
-psuserparams /ProcessComment {.checkprocesscomment} put
6bfa55
+psuserparams /ProcessComment {//.checkprocesscomment exec} put
6bfa55
 (%ProcessComment) cvn {
6bfa55
   /ProcessComment getuserparam
6bfa55
   dup //null eq { pop pop pop } { exec } ifelse
6bfa55
 } bind def
6bfa55
 /ProcessDSCComment //null .definepsuserparam
6bfa55
-psuserparams /ProcessDSCComment {.checkprocesscomment} put
6bfa55
+psuserparams /ProcessDSCComment {//.checkprocesscomment exec} put
6bfa55
 /.loadingfont //false def
6bfa55
 (%ProcessDSCComment) cvn {
6bfa55
   /ProcessDSCComment getuserparam
6bfa55
@@ -556,7 +556,8 @@ end		% serverdict
6bfa55
 % Note that statusdict must be allocated in local VM.
6bfa55
 % We don't bother with many of these yet.
6bfa55
 
6bfa55
-/.dict1 { exch mark 3 1 roll .dicttomark } bind def
6bfa55
+% convenience function to make a dictionary from an object and a key
6bfa55
+/.pair2dict { exch mark 3 1 roll .dicttomark } bind def
6bfa55
 
6bfa55
 currentglobal //false setglobal 25 dict exch setglobal begin
6bfa55
 currentsystemparams
6bfa55
@@ -569,11 +570,11 @@ systemdict /buildtime dup load put
6bfa55
 /checkpassword { .checkpassword 0 gt } bind def
6bfa55
 dup /DoStartPage known
6bfa55
  { /dostartpage { /DoStartPage getsystemparam } bind def
6bfa55
-   /setdostartpage { /DoStartPage .dict1 setsystemparams } bind def
6bfa55
+   /setdostartpage { /DoStartPage //.pair2dict exec setsystemparams } bind def
6bfa55
  } if
6bfa55
 dup /StartupMode known
6bfa55
  { /dosysstart { /StartupMode getsystemparam 0 ne } bind def
6bfa55
-   /setdosysstart { { 1 } { 0 } ifelse /StartupMode .dict1 setsystemparams } bind def
6bfa55
+   /setdosysstart { { 1 } { 0 } ifelse /StartupMode //.pair2dict exec setsystemparams } bind def
6bfa55
  } if
6bfa55
 %****** Setting jobname is supposed to set userparams.JobName, too.
6bfa55
 /jobname { /JobName getuserparam } bind def
6bfa55
@@ -581,7 +582,7 @@ dup /StartupMode known
6bfa55
 /ramsize { /RamSize getsystemparam } bind def
6bfa55
 /realformat 1 index /RealFormat get def
6bfa55
 dup /PrinterName known
6bfa55
- { /setprintername { /PrinterName .dict1 setsystemparams } bind def
6bfa55
+ { /setprintername { /PrinterName //.pair2dict exec setsystemparams } bind def
6bfa55
  } if
6bfa55
 /printername
6bfa55
  { currentsystemparams /PrinterName .knownget not { () } if exch copy
6bfa55
@@ -617,18 +618,18 @@ currentuserparams /WaitTimeout known
6bfa55
    /WaitTimeout exch mark /JobTimeout 5 2 roll .dicttomark setsystemparams
6bfa55
  } bind def
6bfa55
 /.setpagesize
6bfa55
- { 2 copy 2 array astore /PageSize .dict1 { setpagedevice } stopped {
6bfa55
+ { 2 copy 2 array astore /PageSize //.pair2dict exec { setpagedevice } stopped {
6bfa55
      pop	% the setpagedevice dict
6bfa55
      /setpagesize $error /errorname get signalerror
6bfa55
    } {
6bfa55
      pop pop	% success -- pop the arguments
6bfa55
    } ifelse
6bfa55
  } bind def
6bfa55
-/setduplexmode { /Duplex .dict1 setpagedevice } bind def
6bfa55
+/setduplexmode { /Duplex //.pair2dict exec setpagedevice } bind def
6bfa55
 /setmargins
6bfa55
- { exch 2 array astore /Margins .dict1 setpagedevice
6bfa55
+ { exch 2 array astore /Margins //.pair2dict exec setpagedevice
6bfa55
  } bind def
6bfa55
-/setpagemargin { 0 2 array astore /PageOffset .dict1 setpagedevice } bind def
6bfa55
+/setpagemargin { 0 2 array astore /PageOffset //.pair2dict exec setpagedevice } bind def
6bfa55
 /setpageparams
6bfa55
  { mark /PageSize 6 -2 roll
6bfa55
    4 index 1 and ORIENT1 { 1 } { 0 } ifelse ne { exch } if 2 array astore
6bfa55
@@ -642,7 +643,7 @@ currentuserparams /WaitTimeout known
6bfa55
    {
6bfa55
       /setresolution /typecheck signalerror
6bfa55
    } if
6bfa55
-   dup 2 array astore /HWResolution .dict1 { setpagedevice } stopped {
6bfa55
+   dup 2 array astore /HWResolution //.pair2dict exec { setpagedevice } stopped {
6bfa55
      pop /setresolution $error /errorname get signalerror
6bfa55
    } if
6bfa55
  } bind def
6bfa55
@@ -1254,3 +1255,10 @@ def
6bfa55
 %END TN 5044 psuedo-ops
6bfa55
 
6bfa55
 end				% level2dict
6bfa55
+
6bfa55
+% undefine things defined in this file and not referenced elsewhere
6bfa55
+[
6bfa55
+    /.checkprocesscomment
6bfa55
+    /.pair2dict
6bfa55
+]
6bfa55
+{level2dict exch .forceundef} forall
6bfa55
-- 
6bfa55
2.20.1
6bfa55
6bfa55
6bfa55
From 932f4106a00e99e4ee32dcc02e57d3636f383ea1 Mon Sep 17 00:00:00 2001
6bfa55
From: Nancy Durgin <nancy.durgin@artifex.com>
6bfa55
Date: Wed, 28 Nov 2018 10:09:01 -0800
6bfa55
Subject: [PATCH 4/6] Undef internal functions from level2dict
6bfa55
6bfa55
---
6bfa55
 Resource/Init/gs_lev2.ps | 6 ++++--
6bfa55
 1 file changed, 4 insertions(+), 2 deletions(-)
6bfa55
6bfa55
diff --git a/Resource/Init/gs_lev2.ps b/Resource/Init/gs_lev2.ps
6bfa55
index e6f0645..7638f2a 100644
6bfa55
--- a/Resource/Init/gs_lev2.ps
6bfa55
+++ b/Resource/Init/gs_lev2.ps
6bfa55
@@ -117,7 +117,7 @@ counttomark 2 idiv {
6bfa55
 } repeat pop
6bfa55
 /.definepsuserparam {		% <name> <value> .definepsuserparam -
6bfa55
   psuserparams 3 copy pop
6bfa55
-  type cvlit /.checkparamtype cvx 2 packedarray cvx put
6bfa55
+  type cvlit //.checkparamtype /exec load 3 packedarray cvx put
6bfa55
   userparams 3 1 roll put
6bfa55
 } .bind def
6bfa55
 end
6bfa55
@@ -211,7 +211,7 @@ end
6bfa55
      } forall
6bfa55
    } if
6bfa55
    /setsystemparams //pssystemparams mark exch {
6bfa55
-     type cvlit /.checkparamtype cvx 2 packedarray cvx
6bfa55
+     type cvlit //.checkparamtype /exec load 3 packedarray cvx
6bfa55
    } forall .dicttomark .checksetparams
6bfa55
         % Set the C-level system params.  If this succeeds, we know that
6bfa55
         % the password check succeeded.
6bfa55
@@ -1260,5 +1260,7 @@ end				% level2dict
6bfa55
 [
6bfa55
     /.checkprocesscomment
6bfa55
     /.pair2dict
6bfa55
+    /.setcolorrendering1
6bfa55
+    /.checkparamtype
6bfa55
 ]
6bfa55
 {level2dict exch .forceundef} forall
6bfa55
-- 
6bfa55
2.20.1
6bfa55
6bfa55
6bfa55
From e7ff64cf9b756278f19c87d295ee0fd95c955c05 Mon Sep 17 00:00:00 2001
6bfa55
From: Nancy Durgin <nancy.durgin@artifex.com>
6bfa55
Date: Wed, 23 Jan 2019 12:00:30 -0800
6bfa55
Subject: [PATCH 5/6] Fixed bug caused by the way .checksetparams was undef'd
6bfa55
6bfa55
Previously, had undef'd it by making it an operator.
6bfa55
Now just use an immediate reference and undef it in the gs_lev2.ps file.
6bfa55
6bfa55
This fixes bug introduced in commit fe4c47d8e25d6366ecbb5ff487348148b908a89e.
6bfa55
6bfa55
Undef'ing .checksetparams by making it an operator doesn't work right because
6bfa55
errors report .checksetparams as the offending function instead of
6bfa55
the operator that uses it (setsystemparams in this case).
6bfa55
6bfa55
This caused an error in file /tests_private/ps/ps3cet/27-09.PS on page 3,
6bfa55
where it reports the offending function of some error-handling tests.
6bfa55
Reporting function should be 'setsystemparams', not '.checksetparams' on
6bfa55
this page.
6bfa55
---
6bfa55
 Resource/Init/gs_init.ps | 1 -
6bfa55
 Resource/Init/gs_lev2.ps | 7 ++++---
6bfa55
 2 files changed, 4 insertions(+), 4 deletions(-)
6bfa55
6bfa55
diff --git a/Resource/Init/gs_init.ps b/Resource/Init/gs_init.ps
6bfa55
index e915f11..a2503f1 100644
6bfa55
--- a/Resource/Init/gs_init.ps
6bfa55
+++ b/Resource/Init/gs_init.ps
6bfa55
@@ -2278,7 +2278,6 @@ SAFER { .setsafeglobal } if
6bfa55
       /.setuserparams2
6bfa55
       /.startjob
6bfa55
       /.checkFilePermitparams
6bfa55
-      /.checksetparams
6bfa55
       /.copyparam
6bfa55
       /.setpagesize
6bfa55
 
6bfa55
diff --git a/Resource/Init/gs_lev2.ps b/Resource/Init/gs_lev2.ps
6bfa55
index 7638f2a..de1cc94 100644
6bfa55
--- a/Resource/Init/gs_lev2.ps
6bfa55
+++ b/Resource/Init/gs_lev2.ps
6bfa55
@@ -64,7 +64,7 @@ level2dict begin
6bfa55
       pop
6bfa55
     } ifelse pop pop
6bfa55
   } forall pop pop
6bfa55
-} .bind odef
6bfa55
+} .bind def
6bfa55
 
6bfa55
 % currentuser/systemparams creates and returns a dictionary in the
6bfa55
 % current VM.  The easiest way to make this work is to copy any composite
6bfa55
@@ -129,7 +129,7 @@ end
6bfa55
 /.setuserparams2 {
6bfa55
         % Check that we will be able to set the PostScript-level
6bfa55
         % user parameters.
6bfa55
-  /setuserparams /psuserparams .systemvar .checksetparams
6bfa55
+  /setuserparams /psuserparams .systemvar //.checksetparams exec
6bfa55
         % Set the C-level user params.  If this succeeds, we know that
6bfa55
         % the password check succeeded.
6bfa55
   dup .setuserparams
6bfa55
@@ -212,7 +212,7 @@ end
6bfa55
    } if
6bfa55
    /setsystemparams //pssystemparams mark exch {
6bfa55
      type cvlit //.checkparamtype /exec load 3 packedarray cvx
6bfa55
-   } forall .dicttomark .checksetparams
6bfa55
+   } forall .dicttomark //.checksetparams exec
6bfa55
         % Set the C-level system params.  If this succeeds, we know that
6bfa55
         % the password check succeeded.
6bfa55
    dup .setsystemparams
6bfa55
@@ -1262,5 +1262,6 @@ end				% level2dict
6bfa55
     /.pair2dict
6bfa55
     /.setcolorrendering1
6bfa55
     /.checkparamtype
6bfa55
+    /.checksetparams
6bfa55
 ]
6bfa55
 {level2dict exch .forceundef} forall
6bfa55
-- 
6bfa55
2.20.1
6bfa55
6bfa55
6bfa55
From 4ec9ca74bed49f2a82acb4bf430eae0d8b3b75c9 Mon Sep 17 00:00:00 2001
6bfa55
From: Ray Johnston <ray.johnston@artifex.com>
6bfa55
Date: Thu, 31 Jan 2019 11:31:30 -0800
6bfa55
Subject: [PATCH 6/6] Hide pdfdict and GS_PDF_ProcSet (internal stuff for the
6bfa55
 PDF interp).
6bfa55
6bfa55
We now keep GS_PDF_ProcSet in pdfdict, and immediately bind pdfdict
6bfa55
where needed so we can undef it after the last PDF interp file has
6bfa55
run (pdf_sec.ps).
6bfa55
---
6bfa55
 Resource/Init/pdf_base.ps | 11 ++++----
6bfa55
 Resource/Init/pdf_draw.ps | 59 +++++++++++++++++++--------------------
6bfa55
 Resource/Init/pdf_font.ps |  9 +++---
6bfa55
 Resource/Init/pdf_main.ps | 25 +++++++++--------
6bfa55
 Resource/Init/pdf_ops.ps  | 11 ++++----
6bfa55
 Resource/Init/pdf_sec.ps  |  4 ++-
6bfa55
 6 files changed, 60 insertions(+), 59 deletions(-)
6bfa55
6bfa55
diff --git a/Resource/Init/pdf_base.ps b/Resource/Init/pdf_base.ps
6bfa55
index c62ac0e..d3c3a5f 100644
6bfa55
--- a/Resource/Init/pdf_base.ps
6bfa55
+++ b/Resource/Init/pdf_base.ps
6bfa55
@@ -23,7 +23,6 @@
6bfa55
 
6bfa55
 /.setlanguagelevel where { pop 2 .setlanguagelevel } if
6bfa55
 .currentglobal //true .setglobal
6bfa55
-/pdfdict where { pop } { /pdfdict 100 dict def } ifelse
6bfa55
 pdfdict begin
6bfa55
 
6bfa55
 % Define the name interpretation dictionary for reading values.
6bfa55
@@ -130,11 +129,11 @@ currentdict /num-chars-dict .undef
6bfa55
 
6bfa55
 /.pdfexectoken {		% <count> <opdict> <exectoken> .pdfexectoken ?
6bfa55
   PDFDEBUG {
6bfa55
-    pdfdict /PDFSTEPcount known not { pdfdict /PDFSTEPcount 1 .forceput } executeonly if
6bfa55
+    //pdfdict /PDFSTEPcount known not { //pdfdict /PDFSTEPcount 1 .forceput } executeonly if
6bfa55
     PDFSTEP {
6bfa55
-      pdfdict /PDFtokencount 2 copy .knownget { 1 add } { 1 } ifelse .forceput
6bfa55
+      //pdfdict /PDFtokencount 2 copy .knownget { 1 add } { 1 } ifelse .forceput
6bfa55
       PDFSTEPcount 1 gt {
6bfa55
-        pdfdict /PDFSTEPcount PDFSTEPcount 1 sub .forceput
6bfa55
+        //pdfdict /PDFSTEPcount PDFSTEPcount 1 sub .forceput
6bfa55
       } executeonly
6bfa55
       {
6bfa55
         dup ==only
6bfa55
@@ -142,10 +141,10 @@ currentdict /num-chars-dict .undef
6bfa55
         ( ? ) print flush 1 //false .outputpage
6bfa55
         (%stdin) (r) file 255 string readline {
6bfa55
           token {
6bfa55
-            exch pop pdfdict /PDFSTEPcount 3 -1 roll .forceput
6bfa55
+            exch pop //pdfdict /PDFSTEPcount 3 -1 roll .forceput
6bfa55
           } executeonly
6bfa55
           {
6bfa55
-            pdfdict /PDFSTEPcount 1 .forceput
6bfa55
+            //pdfdict /PDFSTEPcount 1 .forceput
6bfa55
           } executeonly ifelse % token
6bfa55
         } {
6bfa55
           pop /PDFSTEP //false def	 % EOF on stdin
6bfa55
diff --git a/Resource/Init/pdf_draw.ps b/Resource/Init/pdf_draw.ps
6bfa55
index d743ae1..1add3f7 100644
6bfa55
--- a/Resource/Init/pdf_draw.ps
6bfa55
+++ b/Resource/Init/pdf_draw.ps
6bfa55
@@ -18,8 +18,7 @@
6bfa55
 
6bfa55
 /.setlanguagelevel where { pop 2 .setlanguagelevel } if
6bfa55
 .currentglobal //true .setglobal
6bfa55
-/pdfdict where { pop } { /pdfdict 100 dict def } ifelse
6bfa55
-GS_PDF_ProcSet begin
6bfa55
+/GS_PDF_ProcSet load begin
6bfa55
 pdfdict begin
6bfa55
 
6bfa55
 % For simplicity, we use a single interpretation dictionary for all
6bfa55
@@ -113,7 +112,7 @@ pdfdict begin
6bfa55
 
6bfa55
 /resolvefunction {	% <fndict> resolvefunction <function>
6bfa55
   .resolvefn
6bfa55
-  PDFDEBUG { pdfdict /PDFSTEPcount .knownget { 1 le } { //true } ifelse { (%Function: ) print dup === flush } if } if
6bfa55
+  PDFDEBUG { //pdfdict /PDFSTEPcount .knownget { 1 le } { //true } ifelse { (%Function: ) print dup === flush } if } if
6bfa55
 } bind executeonly def
6bfa55
 
6bfa55
 /resolvefnproc {	% <fndict> resolvefnproc <proc>
6bfa55
@@ -1073,7 +1072,7 @@ currentdict end readonly def
6bfa55
 %% finished running the PaintProc.
6bfa55
 
6bfa55
 /.actual_pdfpaintproc {         % <patdict> <resdict> .pdfpaintproc -
6bfa55
-  PDFDEBUG { pdfdict /PDFSTEPcount .knownget { 1 le } { //true } ifelse { (%Begin PaintProc) print dup === flush } if } if
6bfa55
+  PDFDEBUG { //pdfdict /PDFSTEPcount .knownget { 1 le } { //true } ifelse { (%Begin PaintProc) print dup === flush } if } if
6bfa55
   PDFfile fileposition 3 1 roll
6bfa55
   q
6bfa55
   1 index /PaintType oget 1 eq {
6bfa55
@@ -1108,21 +1107,21 @@ currentdict end readonly def
6bfa55
       Q
6bfa55
     }{
6bfa55
       (\n   **** Error: File has unbalanced q/Q operators \(too many Q's\)\n               Output may be incorrect.\n)
6bfa55
-      pdfdict /.Qqwarning_issued .knownget
6bfa55
+      //pdfdict /.Qqwarning_issued .knownget
6bfa55
       {
6bfa55
         {
6bfa55
           pop
6bfa55
         }
6bfa55
         {
6bfa55
-          currentglobal pdfdict gcheck .setglobal
6bfa55
-          pdfdict /.Qqwarning_issued //true .forceput
6bfa55
+          currentglobal //pdfdict gcheck .setglobal
6bfa55
+          //pdfdict /.Qqwarning_issued //true .forceput
6bfa55
           .setglobal
6bfa55
           pdfformaterror
6bfa55
         } executeonly ifelse
6bfa55
       }
6bfa55
       {
6bfa55
-        currentglobal pdfdict gcheck .setglobal
6bfa55
-        pdfdict /.Qqwarning_issued //true .forceput
6bfa55
+        currentglobal //pdfdict gcheck .setglobal
6bfa55
+        //pdfdict /.Qqwarning_issued //true .forceput
6bfa55
         .setglobal
6bfa55
         pdfformaterror
6bfa55
       } executeonly ifelse
6bfa55
@@ -1131,21 +1130,21 @@ currentdict end readonly def
6bfa55
   } loop
6bfa55
   {
6bfa55
     (\n   **** Error: File has unbalanced q/Q operators \(too many q's\)\n               Output may be incorrect.\n)
6bfa55
-    pdfdict /.Qqwarning_issued .knownget
6bfa55
+    //pdfdict /.Qqwarning_issued .knownget
6bfa55
     {
6bfa55
       {
6bfa55
         pop
6bfa55
       }
6bfa55
       {
6bfa55
-        currentglobal pdfdict gcheck .setglobal
6bfa55
-        pdfdict /.Qqwarning_issued //true .forceput
6bfa55
+        currentglobal //pdfdict gcheck .setglobal
6bfa55
+        //pdfdict /.Qqwarning_issued //true .forceput
6bfa55
         .setglobal
6bfa55
         pdfformaterror
6bfa55
       } executeonly ifelse
6bfa55
     }
6bfa55
     {
6bfa55
-      currentglobal pdfdict gcheck .setglobal
6bfa55
-      pdfdict /.Qqwarning_issued //true .forceput
6bfa55
+      currentglobal //pdfdict gcheck .setglobal
6bfa55
+      //pdfdict /.Qqwarning_issued //true .forceput
6bfa55
       .setglobal
6bfa55
       pdfformaterror
6bfa55
     } executeonly ifelse
6bfa55
@@ -1156,7 +1155,7 @@ currentdict end readonly def
6bfa55
   /pdfemptycount exch def
6bfa55
 
6bfa55
   Q
6bfa55
-  PDFDEBUG { pdfdict /PDFSTEPcount .knownget { 1 le } { //true } ifelse { (%End PaintProc) print dup === flush } if } if
6bfa55
+  PDFDEBUG { //pdfdict /PDFSTEPcount .knownget { 1 le } { //true } ifelse { (%End PaintProc) print dup === flush } if } if
6bfa55
   PDFfile exch setfileposition
6bfa55
 } bind executeonly odef
6bfa55
 
6bfa55
@@ -1227,7 +1226,7 @@ currentdict end readonly def
6bfa55
   ] cvx put
6bfa55
   dup /BBox 2 copy knownoget { normrect FixPatternBBox put } { pop pop } ifelse
6bfa55
   dup /.pattern_uses_transparency  1 index patternusestransparency put
6bfa55
-  PDFDEBUG { pdfdict /PDFSTEPcount .knownget { 1 le } { //true } ifelse { (%Pattern: ) print dup === flush } if } if
6bfa55
+  PDFDEBUG { //pdfdict /PDFSTEPcount .knownget { 1 le } { //true } ifelse { (%Pattern: ) print dup === flush } if } if
6bfa55
 } bind executeonly def
6bfa55
 
6bfa55
 /ignore_color_op  (   **** Error: Ignoring a color operation in a cached context.\n               Output may be incorrect.\n) readonly def
6bfa55
@@ -2348,16 +2347,16 @@ currentdict /last-ditch-bpc-csp undef
6bfa55
 } bind executeonly def
6bfa55
 
6bfa55
 /IncrementAppearanceNumber {
6bfa55
-  pdfdict /AppearanceNumber .knownget {
6bfa55
-    1 add pdfdict /AppearanceNumber 3 -1 roll .forceput
6bfa55
+  //pdfdict /AppearanceNumber .knownget {
6bfa55
+    1 add //pdfdict /AppearanceNumber 3 -1 roll .forceput
6bfa55
   } executeonly
6bfa55
   {
6bfa55
-    pdfdict /AppearanceNumber 0 .forceput
6bfa55
+    //pdfdict /AppearanceNumber 0 .forceput
6bfa55
   } executeonly ifelse
6bfa55
 }bind executeonly odef
6bfa55
 
6bfa55
 /MakeAppearanceName {
6bfa55
-  pdfdict /AppearanceNumber get
6bfa55
+  //pdfdict /AppearanceNumber get
6bfa55
   10 string cvs
6bfa55
   dup length 10 add string dup 0 (\{FormName) putinterval
6bfa55
   dup 3 -1 roll
6bfa55
@@ -2378,17 +2377,17 @@ currentdict /last-ditch-bpc-csp undef
6bfa55
   gsave initclip
6bfa55
   MakeNewAppearanceName
6bfa55
   .pdfFormName
6bfa55
-  pdfdict /.PreservePDFForm known {pdfdict /.PreservePDFForm get} {//false}ifelse exch
6bfa55
-  pdfdict /.PreservePDFForm true .forceput
6bfa55
+  //pdfdict /.PreservePDFForm known {//pdfdict /.PreservePDFForm get} {//false}ifelse exch
6bfa55
+  //pdfdict /.PreservePDFForm true .forceput
6bfa55
   DoForm
6bfa55
-  pdfdict /.PreservePDFForm 3 -1 roll .forceput
6bfa55
+  //pdfdict /.PreservePDFForm 3 -1 roll .forceput
6bfa55
   grestore
6bfa55
 } bind executeonly odef
6bfa55
 
6bfa55
 /DoForm {
6bfa55
   %% save the current value, if its true we will set it to false later, in order
6bfa55
   %% to prevent us preserving Forms which are used *from* an annotation /Appearance.
6bfa55
-  pdfdict /.PreservePDFForm known {pdfdict /.PreservePDFForm get} {//false}ifelse exch
6bfa55
+  //pdfdict /.PreservePDFForm known {//pdfdict /.PreservePDFForm get} {//false}ifelse exch
6bfa55
 
6bfa55
   %% We may alter the Default* colour spaces, if the Resources
6bfa55
   %% ColorSpace entry contains one of them. But we don't want that
6bfa55
@@ -2503,13 +2502,13 @@ currentdict /last-ditch-bpc-csp undef
6bfa55
   pdfemptycount countdictstack 3 -1 roll
6bfa55
   /pdfemptycount count 4 sub store
6bfa55
 
6bfa55
-  pdfdict /.PreservePDFForm known {pdfdict /.PreservePDFForm get}{//false} ifelse
6bfa55
+  //pdfdict /.PreservePDFForm known {//pdfdict /.PreservePDFForm get}{//false} ifelse
6bfa55
   {
6bfa55
     %% We must *not* preserve any subsidiary forms (curently at least) as PDF
6bfa55
     %% form preservation doesn't really work. This is used just for Annotation
6bfa55
     %% Appearances currently, and if they should happen to use a form, we do not
6bfa55
     %% want to preserve it.
6bfa55
-    pdfdict /.PreservePDFForm false .forceput
6bfa55
+    //pdfdict /.PreservePDFForm false .forceput
6bfa55
     /q cvx /execform cvx 5 -2 roll
6bfa55
   } executeonly
6bfa55
   {
6bfa55
@@ -2542,7 +2541,7 @@ currentdict /last-ditch-bpc-csp undef
6bfa55
     saved_DCMYK /DefaultCMYK exch /ColorSpace defineresource pop
6bfa55
     end
6bfa55
   } if
6bfa55
-  pdfdict /.PreservePDFForm 3 -1 roll .forceput
6bfa55
+  //pdfdict /.PreservePDFForm 3 -1 roll .forceput
6bfa55
 } bind executeonly odef
6bfa55
 
6bfa55
 /_dops_save 1 array def
6bfa55
@@ -2701,13 +2700,13 @@ drawopdict begin
6bfa55
     % Start by getting the object number for a Form XObject
6bfa55
     dup Page /XObject obj_get dup 0 eq not {
6bfa55
       % Now get the recording dictionary and see if that object number has been seen
6bfa55
-      pdfdict /Recursive_XObject_D get 1 index known {
6bfa55
+      //pdfdict /Recursive_XObject_D get 1 index known {
6bfa55
         (   **** Error: Recursive XObject detected, ignoring ") print 1 index 256 string cvs print (", object number ) print 256 string cvs print (\n) print
6bfa55
         (               Output may be incorrect.\n) pdfformaterror
6bfa55
         //false
6bfa55
       }{
6bfa55
         % We haven't seen it yet, so record it.
6bfa55
-        pdfdict /Recursive_XObject_D get 1 index null put
6bfa55
+        //pdfdict /Recursive_XObject_D get 1 index null put
6bfa55
         3 1 roll
6bfa55
         //true
6bfa55
       }ifelse
6bfa55
@@ -2745,7 +2744,7 @@ drawopdict begin
6bfa55
         (               Output may be incorrect.\n) pdfformaterror
6bfa55
       } ifelse
6bfa55
       PDFfile exch setfileposition
6bfa55
-      pdfdict /Recursive_XObject_D get exch undef
6bfa55
+      //pdfdict /Recursive_XObject_D get exch undef
6bfa55
     }{
6bfa55
       % Otherwise ignore it and tidy up the stacks
6bfa55
       pop pop
6bfa55
diff --git a/Resource/Init/pdf_font.ps b/Resource/Init/pdf_font.ps
6bfa55
index 46408f9..275b659 100644
6bfa55
--- a/Resource/Init/pdf_font.ps
6bfa55
+++ b/Resource/Init/pdf_font.ps
6bfa55
@@ -37,8 +37,7 @@
6bfa55
 
6bfa55
 /.setlanguagelevel where { pop 2 .setlanguagelevel } if
6bfa55
 .currentglobal //true .setglobal
6bfa55
-/pdfdict where { pop } { /pdfdict 100 dict def } ifelse
6bfa55
-GS_PDF_ProcSet begin
6bfa55
+/GS_PDF_ProcSet load begin	% from userdict at this point
6bfa55
 pdfdict begin
6bfa55
 
6bfa55
 % We cache the PostScript font in an additional element of the
6bfa55
@@ -1219,11 +1218,11 @@ currentdict /eexec_pdf_param_dict .undef
6bfa55
             .pdfruncontext
6bfa55
             countdictstack BuildCharDictDepth sub
6bfa55
             {
6bfa55
-              pdfdict /.Qqwarning_issued .knownget {not}{//true} ifelse
6bfa55
+              //pdfdict /.Qqwarning_issued .knownget {not}{//true} ifelse
6bfa55
               {
6bfa55
                 (\n   **** Warning: Type 3 glyph has unbalanced q/Q operators \(too many q's\)\n               Output may be incorrect.\n)
6bfa55
                 pdfformatwarning
6bfa55
-                pdfdict /.Qqwarning_issued //true .forceput
6bfa55
+                //pdfdict /.Qqwarning_issued //true .forceput
6bfa55
               } executeonly if
6bfa55
               Q
6bfa55
             } repeat
6bfa55
@@ -2334,7 +2333,7 @@ currentdict /bndef undef
6bfa55
   dup //null eq
6bfa55
   {pop}
6bfa55
   {
6bfa55
-    pdfdict /InputPDFFileName .knownget {.CRCHashFilenameAndObject} if
6bfa55
+    //pdfdict /InputPDFFileName .knownget {.CRCHashFilenameAndObject} if
6bfa55
     exch dup /.OrigUniqueIDXUID .knownget not
6bfa55
     {
6bfa55
       dup /XUID .knownget not
6bfa55
diff --git a/Resource/Init/pdf_main.ps b/Resource/Init/pdf_main.ps
6bfa55
index dd1480b..e44288e 100644
6bfa55
--- a/Resource/Init/pdf_main.ps
6bfa55
+++ b/Resource/Init/pdf_main.ps
6bfa55
@@ -18,8 +18,9 @@
6bfa55
 
6bfa55
 /.setlanguagelevel where { pop 2 .setlanguagelevel } if
6bfa55
 .currentglobal //true .setglobal
6bfa55
-/pdfdict where { pop } { /pdfdict 100 dict def } ifelse
6bfa55
 pdfdict begin
6bfa55
+/GS_PDF_ProcSet dup load def	% keep in pdfdict to hide it
6bfa55
+userdict /GS_PDF_ProcSet undef
6bfa55
 
6bfa55
 % Patch in an obsolete variable used by some third-party software.
6bfa55
 /#? //false def
6bfa55
@@ -304,8 +305,8 @@ currentdict /runpdfstring .undef
6bfa55
    /Page //null def
6bfa55
    /DSCPageCount 0 def
6bfa55
    /PDFSave //null def
6bfa55
-   GS_PDF_ProcSet begin
6bfa55
-   pdfdict begin
6bfa55
+   //pdfdict /GS_PDF_ProcSet get begin
6bfa55
+   //pdfdict begin
6bfa55
    pdfopen begin
6bfa55
    /CumulativePageCount currentpagedevice /PageCount get def
6bfa55
 } bind executeonly def
6bfa55
@@ -624,7 +625,7 @@ currentdict /runpdfstring .undef
6bfa55
   %% copied to a temporary file) and store it in pdfdict. We will use this for
6bfa55
   %% hashing fonts to detect if fonts with the same name are from different files.
6bfa55
   %%
6bfa55
-  dup currentglobal exch true setglobal .getfilename exch setglobal /InputPDFFileName exch pdfdict 3 1 roll .forceput
6bfa55
+  dup currentglobal exch true setglobal .getfilename exch setglobal /InputPDFFileName exch //pdfdict 3 1 roll .forceput
6bfa55
 
6bfa55
   //runpdfbegin exec
6bfa55
   //pdf_collection_files exec
6bfa55
@@ -1390,7 +1391,7 @@ currentdict /xref-char-dict undef
6bfa55
 } bind executeonly def
6bfa55
 
6bfa55
 /pdfopenfile {		% <file> pdfopenfile <dict>
6bfa55
-   pdfdict readonly pop		% can't do it any earlier than this
6bfa55
+   //pdfdict readonly pop		% can't do it any earlier than this
6bfa55
    32 dict begin
6bfa55
    /LocalResources 0 dict def
6bfa55
    /DefaultQstate //null def	% establish binding
6bfa55
@@ -2684,21 +2685,21 @@ currentdict /PDF2PS_matrix_key undef
6bfa55
     StreamRunAborted not {
6bfa55
       (\n   **** Error: File has unbalanced q/Q operators \(too many q's\)\n               Output may be incorrect.\n)
6bfa55
 
6bfa55
-      pdfdict /.Qqwarning_issued .knownget
6bfa55
+      //pdfdict /.Qqwarning_issued .knownget
6bfa55
       {
6bfa55
         {
6bfa55
           pop
6bfa55
         }
6bfa55
         {
6bfa55
-          currentglobal pdfdict gcheck .setglobal
6bfa55
-          pdfdict /.Qqwarning_issued //true .forceput
6bfa55
+          currentglobal //pdfdict gcheck .setglobal
6bfa55
+          //pdfdict /.Qqwarning_issued //true .forceput
6bfa55
           .setglobal
6bfa55
           pdfformaterror
6bfa55
         } executeonly ifelse
6bfa55
       }
6bfa55
       {
6bfa55
-        currentglobal pdfdict gcheck .setglobal
6bfa55
-        pdfdict /.Qqwarning_issued //true .forceput
6bfa55
+        currentglobal //pdfdict gcheck .setglobal
6bfa55
+        //pdfdict /.Qqwarning_issued //true .forceput
6bfa55
         .setglobal
6bfa55
         pdfformaterror
6bfa55
       } executeonly ifelse
6bfa55
@@ -2710,8 +2711,8 @@ currentdict /PDF2PS_matrix_key undef
6bfa55
   Repaired		% pass Repaired state around the restore
6bfa55
   RepairedAnError
6bfa55
   PDFSave restore
6bfa55
-  currentglobal pdfdict gcheck .setglobal
6bfa55
-  pdfdict /.Qqwarning_issued //false .forceput
6bfa55
+  currentglobal //pdfdict gcheck .setglobal
6bfa55
+  //pdfdict /.Qqwarning_issued //false .forceput
6bfa55
   .setglobal
6bfa55
   /RepairedAnError exch def
6bfa55
   /Repaired exch def
6bfa55
diff --git a/Resource/Init/pdf_ops.ps b/Resource/Init/pdf_ops.ps
6bfa55
index aa09641..c2e7461 100644
6bfa55
--- a/Resource/Init/pdf_ops.ps
6bfa55
+++ b/Resource/Init/pdf_ops.ps
6bfa55
@@ -24,6 +24,7 @@
6bfa55
 systemdict /pdfmark known not
6bfa55
  { userdict /pdfmark { cleartomark } bind executeonly put } if
6bfa55
 
6bfa55
+systemdict /pdfdict where { pop } { /pdfdict 100 dict put } ifelse
6bfa55
 userdict /GS_PDF_ProcSet 256 dict dup begin
6bfa55
 
6bfa55
 % ---------------- Abbreviations ---------------- %
6bfa55
@@ -174,21 +175,21 @@ currentdict /gput_always_allow .undef
6bfa55
   {
6bfa55
     (\n   **** Error: File has unbalanced q/Q operators \(too many Q's\)\n               Output may be incorrect.\n)
6bfa55
 
6bfa55
-    pdfdict /.Qqwarning_issued .knownget
6bfa55
+    //pdfdict /.Qqwarning_issued .knownget
6bfa55
     {
6bfa55
       {
6bfa55
         pop
6bfa55
       }
6bfa55
       {
6bfa55
-        currentglobal pdfdict gcheck .setglobal
6bfa55
-        pdfdict /.Qqwarning_issued //true .forceput
6bfa55
+        currentglobal //pdfdict gcheck .setglobal
6bfa55
+        //pdfdict /.Qqwarning_issued //true .forceput
6bfa55
         .setglobal
6bfa55
         pdfformaterror
6bfa55
       } executeonly ifelse
6bfa55
     }
6bfa55
     {
6bfa55
-      currentglobal pdfdict gcheck .setglobal
6bfa55
-      pdfdict /.Qqwarning_issued //true .forceput
6bfa55
+      currentglobal //pdfdict gcheck .setglobal
6bfa55
+      //pdfdict /.Qqwarning_issued //true .forceput
6bfa55
       .setglobal
6bfa55
       pdfformaterror
6bfa55
     } executeonly ifelse
6bfa55
diff --git a/Resource/Init/pdf_sec.ps b/Resource/Init/pdf_sec.ps
6bfa55
index 143efb7..a8e3d2e 100644
6bfa55
--- a/Resource/Init/pdf_sec.ps
6bfa55
+++ b/Resource/Init/pdf_sec.ps
6bfa55
@@ -39,7 +39,6 @@
6bfa55
 
6bfa55
 /.setlanguagelevel where { pop 2 .setlanguagelevel } if
6bfa55
 .currentglobal //true .setglobal
6bfa55
-/pdfdict where { pop } { /pdfdict 100 dict def } ifelse
6bfa55
 pdfdict begin
6bfa55
 
6bfa55
 % Older ghostscript versions do not have .pdftoken, so we use 'token' instead.
6bfa55
@@ -748,4 +747,7 @@ currentdict /PDFScanRules_null undef
6bfa55
  } bind executeonly def
6bfa55
 
6bfa55
 end			% pdfdict
6bfa55
+
6bfa55
+systemdict /pdfdict .forceundef		% hide pdfdict
6bfa55
+
6bfa55
 .setglobal
6bfa55
-- 
6bfa55
2.20.1
6bfa55