Blob Blame History Raw
From: Chris Liddell <chris.liddell@artifex.com>
Date: Mon, 12 Nov 2018 17:21:33 +0000 (+0000)
Subject: Bug 700153: restore: always check available stack

Bug 700153: restore: always check available stack

Previously, we were checking there was enough stack space available when the
restore operation required a device change, but since we have to use
Postscript to reset the userparams (ick!), we need the stack check even when
not changing the device.

https://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=3005fcb9bb160af199e761e03bc70a9f249a987e
---

diff -up ghostscript-9.07/psi/zdevice2.c.cve-2018-19475 ghostscript-9.07/psi/zdevice2.c
--- ghostscript-9.07/psi/zdevice2.c.cve-2018-19475	2019-01-14 14:28:02.359841826 +0100
+++ ghostscript-9.07/psi/zdevice2.c	2019-01-14 14:29:29.939816553 +0100
@@ -276,7 +276,7 @@ restore_page_device(i_ctx_t *i_ctx_p, co
             samepagedevice = false;
     }
 
-    if (LockSafetyParams && !samepagedevice) {
+    if (LockSafetyParams) {
         const int required_ops = 512;
         const int required_es = 32;