5e8686
From 5b85ddd19a8420a1bd2d5529325be35d78e94234 Mon Sep 17 00:00:00 2001
5e8686
From: Chris Liddell <chris.liddell@artifex.com>
5e8686
Date: Fri, 2 Aug 2019 15:18:26 +0100
5e8686
Subject: Bug 701394: protect use of .forceput with executeonly
5e8686
5e8686
5e8686
diff --git a/Resource/Init/gs_type1.ps b/Resource/Init/gs_type1.ps
5e8686
index 6c7735bc0c..a039ccee35 100644
5e8686
--- a/Resource/Init/gs_type1.ps
5e8686
+++ b/Resource/Init/gs_type1.ps
5e8686
@@ -118,25 +118,25 @@
5e8686
                          ( to be the same as glyph: ) print 1 index //== exec } if
5e8686
                    3 index exch 3 index .forceput
5e8686
                                                                  % scratch(string) RAGL(dict) AGL(dict) CharStrings(dict) cstring gname
5e8686
-                 }
5e8686
+                 }executeonly
5e8686
                  {pop} ifelse
5e8686
-               } forall
5e8686
+               } executeonly forall
5e8686
                pop pop
5e8686
-             }
5e8686
+             } executeonly
5e8686
              {
5e8686
                pop pop pop
5e8686
              } ifelse
5e8686
-           }
5e8686
+           } executeonly
5e8686
            {
5e8686
                                                                % scratch(string) RAGL(dict) AGL(dict) CharStrings(dict) cstring gname
5e8686
              pop pop
5e8686
            } ifelse
5e8686
-         } forall
5e8686
+         } executeonly forall
5e8686
          3 1 roll pop pop
5e8686
-     } if
5e8686
+     } executeonly if
5e8686
      pop
5e8686
      dup /.AGLprocessed~GS //true .forceput
5e8686
-   } if
5e8686
+   } executeonly if
5e8686
 
5e8686
    %% We need to excute the C .buildfont1 in a stopped context so that, if there
5e8686
    %% are errors we can put the stack back sanely and exit. Otherwise callers won't