7c5933
From: Chris Liddell <chris.liddell@artifex.com>
7c5933
Date: Mon, 12 Nov 2018 17:21:33 +0000 (+0000)
7c5933
Subject: Bug 700153: restore: always check available stack
7c5933
7c5933
Bug 700153: restore: always check available stack
7c5933
7c5933
Previously, we were checking there was enough stack space available when the
7c5933
restore operation required a device change, but since we have to use
7c5933
Postscript to reset the userparams (ick!), we need the stack check even when
7c5933
not changing the device.
7c5933
7c5933
https://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=3005fcb9bb160af199e761e03bc70a9f249a987e
7c5933
---
7c5933
7c5933
diff -up ghostscript-9.07/psi/zdevice2.c.cve-2018-19475 ghostscript-9.07/psi/zdevice2.c
7c5933
--- ghostscript-9.07/psi/zdevice2.c.cve-2018-19475	2019-01-14 14:28:02.359841826 +0100
7c5933
+++ ghostscript-9.07/psi/zdevice2.c	2019-01-14 14:29:29.939816553 +0100
7c5933
@@ -276,7 +276,7 @@ restore_page_device(i_ctx_t *i_ctx_p, co
7c5933
             samepagedevice = false;
7c5933
     }
7c5933
 
7c5933
-    if (LockSafetyParams && !samepagedevice) {
7c5933
+    if (LockSafetyParams) {
7c5933
         const int required_ops = 512;
7c5933
         const int required_es = 32;
7c5933