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

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