summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2018-08-23 09:54:59 +0100
committerChris Liddell <chris.liddell@artifex.com>2018-08-23 10:23:18 +0100
commit78911a01b67d590b4a91afac2e8417360b934156 (patch)
tree1bcdab8b9ae7c1d350533f032f86f4b4c72cbff9
parent0edd3d6c634a577db261615a9dc2719bca7f6e01 (diff)
Bug 699654: Check the restore operand type
The primary function that implements restore correctly checked its parameter, but a function that does some preliminary work for the restore (gstate and device handling) did not check. So, even though the restore correctly errored out, it left things partially done and, in particular, the device in partially restored state. Meaning the LockSafetyParams was not correctly set.
-rw-r--r--psi/zdevice2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/psi/zdevice2.c b/psi/zdevice2.c
index de16dd295..9fbb4e339 100644
--- a/psi/zdevice2.c
+++ b/psi/zdevice2.c
@@ -312,6 +312,9 @@ z2grestoreall(i_ctx_t *i_ctx_p)
312static int 312static int
313z2restore(i_ctx_t *i_ctx_p) 313z2restore(i_ctx_t *i_ctx_p)
314{ 314{
315 os_ptr op = osp;
316 check_type(*op, t_save);
317
315 while (gs_gstate_saved(gs_gstate_saved(igs))) { 318 while (gs_gstate_saved(gs_gstate_saved(igs))) {
316 if (restore_page_device(igs, gs_gstate_saved(igs))) 319 if (restore_page_device(igs, gs_gstate_saved(igs)))
317 return push_callout(i_ctx_p, "%restore1pagedevice"); 320 return push_callout(i_ctx_p, "%restore1pagedevice");