diff options
author | Ray Johnston <ray.johnston@artifex.com> | 2018-08-29 09:30:19 -0700 |
---|---|---|
committer | Ray Johnston <ray.johnston@artifex.com> | 2018-08-31 07:35:45 -0700 |
commit | c98cb5237c983e363fe05757b2639eab550499e8 (patch) | |
tree | dcab703c4045bb9a384dbe29c30850c73a850a1f | |
parent | d60214879cd71cf9f995c7d8862394293ffa9014 (diff) |
Fix for security issues found during internal security audit
While most of the invocations of .forceput and related operators were
"protected" by being within "executeonly" procedures, several had crept
in that did not make sure that the operator was hidden in a procedure
that could not be read.
-rw-r--r-- | Resource/Init/gs_dps.ps | 2 | ||||
-rw-r--r-- | Resource/Init/gs_fntem.ps | 2 | ||||
-rw-r--r-- | Resource/Init/gs_init.ps | 254 | ||||
-rw-r--r-- | Resource/Init/gs_lev2.ps | 3 | ||||
-rw-r--r-- | Resource/Init/gs_pdfwr.ps | 3 | ||||
-rw-r--r-- | Resource/Init/gs_setpd.ps | 2 | ||||
-rw-r--r-- | Resource/Init/gs_typ32.ps | 2 |
7 files changed, 134 insertions, 134 deletions
diff --git a/Resource/Init/gs_dps.ps b/Resource/Init/gs_dps.ps index 3ebd0a331..cad705623 100644 --- a/Resource/Init/gs_dps.ps +++ b/Resource/Init/gs_dps.ps | |||
@@ -70,7 +70,7 @@ | |||
70 | % Save a copy of the initial gstate. | 70 | % Save a copy of the initial gstate. |
71 | //systemdict /savedinitialgstate gstate readonly .forceput | 71 | //systemdict /savedinitialgstate gstate readonly .forceput |
72 | .setglobal | 72 | .setglobal |
73 | } .bind def | 73 | } .bind executeonly def % must be bound and hidden for .forceput |
74 | 74 | ||
75 | % Initialize local dictionaries and gstate when creating a new context. | 75 | % Initialize local dictionaries and gstate when creating a new context. |
76 | % Note that until this completes, we are in the anomalous situation of | 76 | % Note that until this completes, we are in the anomalous situation of |
diff --git a/Resource/Init/gs_fntem.ps b/Resource/Init/gs_fntem.ps index 0f7c3153a..3ceee18d3 100644 --- a/Resource/Init/gs_fntem.ps +++ b/Resource/Init/gs_fntem.ps | |||
@@ -408,7 +408,7 @@ currentdict end def | |||
408 | exit | 408 | exit |
409 | } loop | 409 | } loop |
410 | exch setglobal | 410 | exch setglobal |
411 | } bind def | 411 | } .bind executeonly def % must be bound and hidden for .forceput |
412 | 412 | ||
413 | currentdict end /ProcSet defineresource pop | 413 | currentdict end /ProcSet defineresource pop |
414 | 414 | ||
diff --git a/Resource/Init/gs_init.ps b/Resource/Init/gs_init.ps index 4a66af035..0fb46790e 100644 --- a/Resource/Init/gs_init.ps +++ b/Resource/Init/gs_init.ps | |||
@@ -2136,141 +2136,141 @@ readonly def | |||
2136 | SAFER { .setsafeglobal } if | 2136 | SAFER { .setsafeglobal } if |
2137 | 2137 | ||
2138 | /SAFERUndefinePostScriptOperators { | 2138 | /SAFERUndefinePostScriptOperators { |
2139 | [ | 2139 | [ |
2140 | % Used by our own test suite files | 2140 | % Used by our own test suite files |
2141 | /.pushpdf14devicefilter % transparency-example.ps | 2141 | /.pushpdf14devicefilter % transparency-example.ps |
2142 | /.poppdf14devicefilter % transparency-example.ps | 2142 | /.poppdf14devicefilter % transparency-example.ps |
2143 | /.setopacityalpha % transparency-example.ps | 2143 | /.setopacityalpha % transparency-example.ps |
2144 | /.setshapealpha % transparency-example.ps | 2144 | /.setshapealpha % transparency-example.ps |
2145 | /.endtransparencygroup % transparency-example.ps | 2145 | /.endtransparencygroup % transparency-example.ps |
2146 | /.setdotlength % Bug687720.ps | 2146 | /.setdotlength % Bug687720.ps |
2147 | /.sort /.setdebug /.mementolistnewblocks /getenv | 2147 | /.sort /.setdebug /.mementolistnewblocks /getenv |
2148 | 2148 | ||
2149 | /.makeoperator /.setCPSImode % gs_cet.ps, this won't work on cluster with -dSAFER | 2149 | /.makeoperator /.setCPSImode % gs_cet.ps, this won't work on cluster with -dSAFER |
2150 | 2150 | ||
2151 | /unread | 2151 | /unread |
2152 | ] | 2152 | ] |
2153 | {systemdict exch .forceundef} forall | 2153 | {systemdict exch .forceundef} forall |
2154 | 2154 | ||
2155 | //systemdict /SAFERUndefinePostScriptOperators .forceundef | 2155 | //systemdict /SAFERUndefinePostScriptOperators .forceundef |
2156 | }bind def | 2156 | } .bind executeonly def % must be bound and hidden for .forceundef |
2157 | 2157 | ||
2158 | /UndefinePostScriptOperators { | 2158 | /UndefinePostScriptOperators { |
2159 | 2159 | ||
2160 | %% This list is of Display PostScript operators. We believe that Display PostScript | 2160 | %% This list is of Display PostScript operators. We believe that Display PostScript |
2161 | %% was never fully implemented and the only known user, GNUStep, is no longer | 2161 | %% was never fully implemented and the only known user, GNUStep, is no longer |
2162 | %% using it. So lets remove it. | 2162 | %% using it. So lets remove it. |
2163 | [ | 2163 | [ |
2164 | /condition /currentcontext /detach /.fork /join /.localfork /lock /monitor /notify | 2164 | /condition /currentcontext /detach /.fork /join /.localfork /lock /monitor /notify |
2165 | /wait /yield /.currentscreenphase /.setscreenphase /.image2 /eoviewclip /initviewclip | 2165 | /wait /yield /.currentscreenphase /.setscreenphase /.image2 /eoviewclip /initviewclip |
2166 | /viewclip /viewclippath /defineusername | 2166 | /viewclip /viewclippath /defineusername |
2167 | %% NeXT DPS extensions | 2167 | %% NeXT DPS extensions |
2168 | /currentalpha /setalpha /.alphaimage /composite /compositerect /dissolve /sizeimagebox /.sizeimageparams | 2168 | /currentalpha /setalpha /.alphaimage /composite /compositerect /dissolve /sizeimagebox /.sizeimageparams |
2169 | ] | 2169 | ] |
2170 | {systemdict exch .forceundef} forall | 2170 | {systemdict exch .forceundef} forall |
2171 | 2171 | ||
2172 | %% This list is of operators which no longer appear to be used, and which we do not believe | 2172 | %% This list is of operators which no longer appear to be used, and which we do not believe |
2173 | %% to have any real use. For now we will undefine the operstors so they cannot easily be used | 2173 | %% to have any real use. For now we will undefine the operstors so they cannot easily be used |
2174 | %% but can be easily restored (just delete the name from the list in the array). In future | 2174 | %% but can be easily restored (just delete the name from the list in the array). In future |
2175 | %% we may remove the operator and the code implementation entirely. | 2175 | %% we may remove the operator and the code implementation entirely. |
2176 | [ | 2176 | [ |
2177 | /.bitadd /.charboxpath /.cond /.countexecstack /.execstack /.runandhide /.popdevicefilter | 2177 | /.bitadd /.charboxpath /.cond /.countexecstack /.execstack /.runandhide /.popdevicefilter |
2178 | /.execfile /.filenamesplit /.file_name_parent | 2178 | /.execfile /.filenamesplit /.file_name_parent |
2179 | /.setdefaultmatrix /.isprocfilter /.unread /.psstringencode | 2179 | /.setdefaultmatrix /.isprocfilter /.unread /.psstringencode |
2180 | /.buildsampledfunction /.isencapfunction /.currentaccuratecurves /.currentcurvejoin /.currentdashadapt /.currentdotlength | 2180 | /.buildsampledfunction /.isencapfunction /.currentaccuratecurves /.currentcurvejoin /.currentdashadapt /.currentdotlength |
2181 | /.currentlimitclamp /.dotorientation /.setaccuratecurves /.setcurvejoin /.setdashadapt /.setdotorientation | 2181 | /.currentlimitclamp /.dotorientation /.setaccuratecurves /.setcurvejoin /.setdashadapt /.setdotorientation |
2182 | /.setlimitclamp /.currentscreenlevels /.dashpath /.pathbbox /.identeq /.identne /.tokenexec /.forgetsave /.pantonecallback | 2182 | /.setlimitclamp /.currentscreenlevels /.dashpath /.pathbbox /.identeq /.identne /.tokenexec /.forgetsave /.pantonecallback |
2183 | 2183 | ||
2184 | %% Used by our own test suite files | 2184 | %% Used by our own test suite files |
2185 | %%/.setdotlength % Bug687720.ps | 2185 | %%/.setdotlength % Bug687720.ps |
2186 | ] | 2186 | ] |
2187 | {systemdict exch .forceundef} forall | 2187 | {systemdict exch .forceundef} forall |
2188 | 2188 | ||
2189 | %% This list of operators are used internally by various parts of the Ghostscript startup code. | 2189 | %% This list of operators are used internally by various parts of the Ghostscript startup code. |
2190 | %% Since each operator is a potential security vulnerability, and any operator listed here | 2190 | %% Since each operator is a potential security vulnerability, and any operator listed here |
2191 | %% is not required once the initislisation is complete and functions are bound, we undefine | 2191 | %% is not required once the initislisation is complete and functions are bound, we undefine |
2192 | %% the ones that aren't needed at runtime. | 2192 | %% the ones that aren't needed at runtime. |
2193 | [ | 2193 | [ |
2194 | /.callinstall /.callbeginpage /.callendpage | 2194 | /.callinstall /.callbeginpage /.callendpage |
2195 | /.currentstackprotect /.setstackprotect /.errorexec /.finderrorobject /.installsystemnames /.bosobject /.fontbbox | 2195 | /.currentstackprotect /.setstackprotect /.errorexec /.finderrorobject /.installsystemnames /.bosobject /.fontbbox |
2196 | /.type1execchar /.type2execchar /.type42execchar /.setweightvector /.getuseciecolor /processcolors /.includecolorspace | 2196 | /.type1execchar /.type2execchar /.type42execchar /.setweightvector /.getuseciecolor /processcolors /.includecolorspace |
2197 | /.execn /.instopped /.stop /.stopped /.setcolorrendering /.setdevicecolorrendering /.buildcolorrendering1 /.builddevicecolorrendering1 | 2197 | /.execn /.instopped /.stop /.stopped /.setcolorrendering /.setdevicecolorrendering /.buildcolorrendering1 /.builddevicecolorrendering1 |
2198 | /.TransformPQR_scale_WB0 /.TransformPQR_scale_WB1 /.TransformPQR_scale_WB2 /.currentoverprintmode /.copydevice2 | 2198 | /.TransformPQR_scale_WB0 /.TransformPQR_scale_WB1 /.TransformPQR_scale_WB2 /.currentoverprintmode /.copydevice2 |
2199 | /.devicename /.doneshowpage /.getbitsrect /.getdevice /.getdefaultdevice /.getdeviceparams /.gethardwareparams | 2199 | /.devicename /.doneshowpage /.getbitsrect /.getdevice /.getdefaultdevice /.getdeviceparams /.gethardwareparams |
2200 | /makewordimagedevice /.outputpage /.putdeviceparams /.setdevice /.currentshowpagecount | 2200 | /makewordimagedevice /.outputpage /.putdeviceparams /.setdevice /.currentshowpagecount |
2201 | /.setpagedevice /.currentpagedevice /.knownundef /.setmaxlength /.rectappend /.initialize_dsc_parser /.parse_dsc_comments | 2201 | /.setpagedevice /.currentpagedevice /.knownundef /.setmaxlength /.rectappend /.initialize_dsc_parser /.parse_dsc_comments |
2202 | /.fillCIDMap /.fillIdentityCIDMap /.buildcmap /.filenamelistseparator /.libfile /.getfilename | 2202 | /.fillCIDMap /.fillIdentityCIDMap /.buildcmap /.filenamelistseparator /.libfile /.getfilename |
2203 | /.file_name_combine /.file_name_is_absolute /.file_name_separator /.file_name_directory_separator /.file_name_current /.filename | 2203 | /.file_name_combine /.file_name_is_absolute /.file_name_separator /.file_name_directory_separator /.file_name_current /.filename |
2204 | /.peekstring /.writecvp /.subfiledecode /.setupUnicodeDecoder /.jbig2makeglobalctx /.registerfont /.parsecff | 2204 | /.peekstring /.writecvp /.subfiledecode /.setupUnicodeDecoder /.jbig2makeglobalctx /.registerfont /.parsecff |
2205 | /.getshowoperator /.getnativefonts /.beginform /.endform /.get_form_id /.repeatform /.reusablestream /.rsdparams | 2205 | /.getshowoperator /.getnativefonts /.beginform /.endform /.get_form_id /.repeatform /.reusablestream /.rsdparams |
2206 | /.buildfunction /.currentfilladjust2 /.setfilladjust2 /.sethpglpathmode /.currenthpglpathmode | 2206 | /.buildfunction /.currentfilladjust2 /.setfilladjust2 /.sethpglpathmode /.currenthpglpathmode |
2207 | /.currenthalftone /.sethalftone5 /.image1 /.imagemask1 /.image3 /.image4 | 2207 | /.currenthalftone /.sethalftone5 /.image1 /.imagemask1 /.image3 /.image4 |
2208 | /.getiodevice /.getdevparms /.putdevparams /.bbox_transform /.matchmedia /.matchpagesize /.defaultpapersize | 2208 | /.getiodevice /.getdevparms /.putdevparams /.bbox_transform /.matchmedia /.matchpagesize /.defaultpapersize |
2209 | /.oserrno /.setoserrno /.oserrorstring /.getCPSImode | 2209 | /.oserrno /.setoserrno /.oserrorstring /.getCPSImode |
2210 | /.getscanconverter /.setscanconverter /.type1encrypt /.type1decrypt/.languagelevel /.setlanguagelevel /.eqproc /.fillpage /.buildpattern1 /.saslprep | 2210 | /.getscanconverter /.setscanconverter /.type1encrypt /.type1decrypt/.languagelevel /.setlanguagelevel /.eqproc /.fillpage /.buildpattern1 /.saslprep |
2211 | /.buildshading1 /.buildshading2 /.buildshading3 /.buildshading4 /.buildshading5 /.buildshading6 /.buildshading7 /.buildshadingpattern | 2211 | /.buildshading1 /.buildshading2 /.buildshading3 /.buildshading4 /.buildshading5 /.buildshading6 /.buildshading7 /.buildshadingpattern |
2212 | /.shfill /.argindex /.bytestring /.namestring /.stringbreak /.stringmatch /.globalvmarray /.globalvmdict /.globalvmpackedarray /.globalvmstring | 2212 | /.shfill /.argindex /.bytestring /.namestring /.stringbreak /.stringmatch /.globalvmarray /.globalvmdict /.globalvmpackedarray /.globalvmstring |
2213 | /.localvmarray /.localvmdict /.localvmpackedarray /.localvmstring /.systemvmarray /.systemvmdict /.systemvmpackedarray /.systemvmstring /.systemvmfile /.systemvmlibfile | 2213 | /.localvmarray /.localvmdict /.localvmpackedarray /.localvmstring /.systemvmarray /.systemvmdict /.systemvmpackedarray /.systemvmstring /.systemvmfile /.systemvmlibfile |
2214 | /.systemvmSFD /.settrapparams /.currentsystemparams /.currentuserparams /.getsystemparam /.getuserparam /.setsystemparams /.setuserparams | 2214 | /.systemvmSFD /.settrapparams /.currentsystemparams /.currentuserparams /.getsystemparam /.getuserparam /.setsystemparams /.setuserparams |
2215 | /.checkpassword /.locale_to_utf8 /.currentglobal /.gcheck /.imagepath | 2215 | /.checkpassword /.locale_to_utf8 /.currentglobal /.gcheck /.imagepath |
2216 | 2216 | ||
2217 | % Used by a free user in the Library of Congress. Apparently this is used to | 2217 | % Used by a free user in the Library of Congress. Apparently this is used to |
2218 | % draw a partial page, which is then filled in by the results of a barcode | 2218 | % draw a partial page, which is then filled in by the results of a barcode |
2219 | % scanner and SQL database lookup. Its not clear to us exactly why this needs to be | 2219 | % scanner and SQL database lookup. Its not clear to us exactly why this needs to be |
2220 | % done as a partial page, but its easiest to restore the operator, and it seems like | 2220 | % done as a partial page, but its easiest to restore the operator, and it seems like |
2221 | % its a reasonably safe operator to restore, for the *very* few devices on which | 2221 | % its a reasonably safe operator to restore, for the *very* few devices on which |
2222 | % it will have any effect. Currently this uses the 'sync_outptu' device method | 2222 | % it will have any effect. Currently this uses the 'sync_outptu' device method |
2223 | % to transfer the partial page, in future we may use a spec_op instead. | 2223 | % to transfer the partial page, in future we may use a spec_op instead. |
2224 | %/flushpage | 2224 | %/flushpage |
2225 | 2225 | ||
2226 | % Used by our own test suite files | 2226 | % Used by our own test suite files |
2227 | %/.fileposition %image-qa.ps | 2227 | %/.fileposition %image-qa.ps |
2228 | %/.makeoperator /.setCPSImode % gs_cet.ps | 2228 | %/.makeoperator /.setCPSImode % gs_cet.ps |
2229 | 2229 | ||
2230 | % Either our code uses these in ways which mean they can't be undefined, or they are used directly by | 2230 | % Either our code uses these in ways which mean they can't be undefined, or they are used directly by |
2231 | % test files/utilities, or engineers expressed a desire to keep them visible. | 2231 | % test files/utilities, or engineers expressed a desire to keep them visible. |
2232 | % | 2232 | % |
2233 | %/currentdevice /.sort /.buildfont0 /.buildfont1 /.buildfont2 /.buildfont3 /.buildfont4 /.buildfont9 /.buildfont10 /.buildfont11 | 2233 | %/currentdevice /.sort /.buildfont0 /.buildfont1 /.buildfont2 /.buildfont3 /.buildfont4 /.buildfont9 /.buildfont10 /.buildfont11 |
2234 | %/.buildfotn32 /.buildfont42 /.type9mapcid /.type11mapcid /.swapcolors | 2234 | %/.buildfotn32 /.buildfont42 /.type9mapcid /.type11mapcid /.swapcolors |
2235 | %/currentdevice /.quit /.setuseciecolor /.needinput /.setoverprintmode /.special_op /.dicttomark /.knownget | 2235 | %/currentdevice /.quit /.setuseciecolor /.needinput /.setoverprintmode /.special_op /.dicttomark /.knownget |
2236 | %/.FAPIavailable /.FAPIpassfont /.FAPIrebuildfont /.FAPIBuildGlyph /.FAPIBuildChar /.FAPIBuildGlyph9 | 2236 | %/.FAPIavailable /.FAPIpassfont /.FAPIrebuildfont /.FAPIBuildGlyph /.FAPIBuildChar /.FAPIBuildGlyph9 |
2237 | %/.tempfile /.numicc_components /.set_outputintent /.max /.min /.vmreclaim /.getpath /.setglobal | 2237 | %/.tempfile /.numicc_components /.set_outputintent /.max /.min /.vmreclaim /.getpath /.setglobal |
2238 | %/.setdebug /.mementolistnewblocks /getenv | 2238 | %/.setdebug /.mementolistnewblocks /getenv |
2239 | ] | 2239 | ] |
2240 | {systemdict exch .forceundef} forall | 2240 | {systemdict exch .forceundef} forall |
2241 | 2241 | ||
2242 | //systemdict /UndefinePostScriptOperators .forceundef | 2242 | //systemdict /UndefinePostScriptOperators .forceundef |
2243 | } bind def | 2243 | } .bind executeonly def % must be bound and hidden for .forceundef |
2244 | 2244 | ||
2245 | /UndefinePDFOperators { | 2245 | /UndefinePDFOperators { |
2246 | %% This list of operators are used internally by various parts of the Ghostscript PDF interpreter. | 2246 | %% This list of operators are used internally by various parts of the Ghostscript PDF interpreter. |
2247 | %% Since each operator is a potential security vulnerability, and any operator listed here | 2247 | %% Since each operator is a potential security vulnerability, and any operator listed here |
2248 | %% is not required once the initislisation is complete and functions are bound, we undefine | 2248 | %% is not required once the initislisation is complete and functions are bound, we undefine |
2249 | %% the ones that aren't needed at runtime. | 2249 | %% the ones that aren't needed at runtime. |
2250 | %% This function is only called if DELAYBIND is true. It is a copy of the code at the end of pdf_main.ps | 2250 | %% This function is only called if DELAYBIND is true. It is a copy of the code at the end of pdf_main.ps |
2251 | %% and must be maintained in parallel with it. | 2251 | %% and must be maintained in parallel with it. |
2252 | [ | 2252 | [ |
2253 | /.pdfawidthshow /.pdfwidthshow /.currentblackptcomp /.setblackptcomp | 2253 | /.pdfawidthshow /.pdfwidthshow /.currentblackptcomp /.setblackptcomp |
2254 | /.setfillcolor /.setfillcolorspace /.setstrokecolor /.setstrokecolorspace /.currentrenderingintent /.setrenderingintent | 2254 | /.setfillcolor /.setfillcolorspace /.setstrokecolor /.setstrokecolorspace /.currentrenderingintent /.setrenderingintent |
2255 | /.currenttextrenderingmode /.settextspacing /.currenttextspacing /.settextleading /.currenttextleading | 2255 | /.currenttextrenderingmode /.settextspacing /.currenttextspacing /.settextleading /.currenttextleading |
2256 | /.settextrise /.currenttextrise /.setwordspacing /.currentwordspacing /.settexthscaling /.currenttexthscaling | 2256 | /.settextrise /.currenttextrise /.setwordspacing /.currentwordspacing /.settexthscaling /.currenttexthscaling |
2257 | /.settextlinematrix /.currenttextlinematrix /.currenttextmatrix /.settextmatrix /.currentblendmode | 2257 | /.settextlinematrix /.currenttextlinematrix /.currenttextmatrix /.settextmatrix /.currentblendmode |
2258 | /.currentopacityalpha /.currentshapealpha /.currenttextknockout | 2258 | /.currentopacityalpha /.currentshapealpha /.currenttextknockout |
2259 | /.pushextendedgstate /.popextendedgstate /.begintransparencytextgroup | 2259 | /.pushextendedgstate /.popextendedgstate /.begintransparencytextgroup |
2260 | /.endtransparencytextgroup /.begintransparencymaskgroup /.begintransparencymaskimage /.endtransparencymask /.image3x | 2260 | /.endtransparencytextgroup /.begintransparencymaskgroup /.begintransparencymaskimage /.endtransparencymask /.image3x |
2261 | /.abortpdf14devicefilter /.pdfinkpath /.pdfFormName /.setstrokeconstantalpha | 2261 | /.abortpdf14devicefilter /.pdfinkpath /.pdfFormName /.setstrokeconstantalpha |
2262 | /.setfillconstantalpha /.setalphaisshape /.currentalphaisshape | 2262 | /.setfillconstantalpha /.setalphaisshape /.currentalphaisshape |
2263 | /.settextspacing /.currenttextspacing /.settextleading /.currenttextleading /.settextrise /.currenttextrise | 2263 | /.settextspacing /.currenttextspacing /.settextleading /.currenttextleading /.settextrise /.currenttextrise |
2264 | /.setwordspacing /.currentwordspacing /.settexthscaling /.currenttexthscaling /.setPDFfontsize /.currentPDFfontsize | 2264 | /.setwordspacing /.currentwordspacing /.settexthscaling /.currenttexthscaling /.setPDFfontsize /.currentPDFfontsize |
2265 | /.setdistillerparams | 2265 | /.setdistillerparams |
2266 | 2266 | ||
2267 | % undefining these causes errors/incorrect output | 2267 | % undefining these causes errors/incorrect output |
2268 | %/.settextrenderingmode /.setblendmode /.begintransparencygroup /.settextknockout /check_r6_password /.setstrokeoverprint /.setfilloverprint | 2268 | %/.settextrenderingmode /.setblendmode /.begintransparencygroup /.settextknockout /check_r6_password /.setstrokeoverprint /.setfilloverprint |
2269 | %/.currentstrokeoverprint /.currentfilloverprint /.currentfillconstantalpha /.currentstrokeconstantalpha | 2269 | %/.currentstrokeoverprint /.currentfilloverprint /.currentfillconstantalpha /.currentstrokeconstantalpha |
2270 | ] | 2270 | ] |
2271 | {systemdict exch .forceundef} forall | 2271 | {systemdict exch .forceundef} forall |
2272 | //systemdict /UndefinePDFOperators .forceundef | 2272 | //systemdict /UndefinePDFOperators .forceundef |
2273 | } bind def | 2273 | } .bind executeonly def % must be bound and hidden for .forceundef |
2274 | 2274 | ||
2275 | % If we delayed binding, make it possible to do it later. | 2275 | % If we delayed binding, make it possible to do it later. |
2276 | /.bindnow { | 2276 | /.bindnow { |
diff --git a/Resource/Init/gs_lev2.ps b/Resource/Init/gs_lev2.ps index 72c11edb4..61e3548ac 100644 --- a/Resource/Init/gs_lev2.ps +++ b/Resource/Init/gs_lev2.ps | |||
@@ -163,7 +163,8 @@ end | |||
163 | % Set them again to the new values. From here on, we are safe, | 163 | % Set them again to the new values. From here on, we are safe, |
164 | % since a context switch will consult userparams. | 164 | % since a context switch will consult userparams. |
165 | .setuserparams | 165 | .setuserparams |
166 | } .bind def | 166 | } .bind executeonly def % must be bound and hidden for .forceput |
167 | |||
167 | /setuserparams { % <dict> setuserparams - | 168 | /setuserparams { % <dict> setuserparams - |
168 | .setuserparams2 | 169 | .setuserparams2 |
169 | } .bind odef | 170 | } .bind odef |
diff --git a/Resource/Init/gs_pdfwr.ps b/Resource/Init/gs_pdfwr.ps index 230fb21ad..fb1c4191c 100644 --- a/Resource/Init/gs_pdfwr.ps +++ b/Resource/Init/gs_pdfwr.ps | |||
@@ -660,8 +660,7 @@ currentdict /.pdfmarkparams .undef | |||
660 | { | 660 | { |
661 | pop | 661 | pop |
662 | } ifelse | 662 | } ifelse |
663 | } | 663 | } .bind executeonly def % must be bound and hidden for .forceput |
664 | bind def | ||
665 | 664 | ||
666 | % Use the DSC processing hook to pass DSC comments to the driver. | 665 | % Use the DSC processing hook to pass DSC comments to the driver. |
667 | % We use a pseudo-parameter named DSC whose value is an array: | 666 | % We use a pseudo-parameter named DSC whose value is an array: |
diff --git a/Resource/Init/gs_setpd.ps b/Resource/Init/gs_setpd.ps index 4cdfdc0e1..bba3c8c0e 100644 --- a/Resource/Init/gs_setpd.ps +++ b/Resource/Init/gs_setpd.ps | |||
@@ -624,7 +624,7 @@ SETPDDEBUG { (Rolling back.) = pstack flush } if | |||
624 | { 4 index 3 1 roll .forceput } | 624 | { 4 index 3 1 roll .forceput } |
625 | { 3 index exch .undef } | 625 | { 3 index exch .undef } |
626 | ifelse | 626 | ifelse |
627 | } .bind | 627 | } .bind executeonly % must be bound and hidden for .forceput |
628 | 7 { % For PageSize only, just impose the request. | 628 | 7 { % For PageSize only, just impose the request. |
629 | 1 index /PageSize eq | 629 | 1 index /PageSize eq |
630 | { pop pop 1 index /PageSize 7 put } | 630 | { pop pop 1 index /PageSize 7 put } |
diff --git a/Resource/Init/gs_typ32.ps b/Resource/Init/gs_typ32.ps index 747196f48..b6600b0ce 100644 --- a/Resource/Init/gs_typ32.ps +++ b/Resource/Init/gs_typ32.ps | |||
@@ -85,7 +85,7 @@ systemdict /.removeglyphs .undef | |||
85 | { dup /FontType 32 .forceput | 85 | { dup /FontType 32 .forceput |
86 | dup /CharStrings 20 dict .forceput | 86 | dup /CharStrings 20 dict .forceput |
87 | 1 index exch .buildfont32 exch pop | 87 | 1 index exch .buildfont32 exch pop |
88 | } bind def | 88 | } .bind executeonly def % must be bound and hidden for .forceput |
89 | 89 | ||
90 | end % .cidfonttypes | 90 | end % .cidfonttypes |
91 | 91 | ||