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

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