diff options
author | Chris Liddell <chris.liddell@artifex.com> | 2018-08-23 09:54:59 +0100 |
---|---|---|
committer | Chris Liddell <chris.liddell@artifex.com> | 2018-08-23 10:23:18 +0100 |
commit | 78911a01b67d590b4a91afac2e8417360b934156 (patch) | |
tree | 1bcdab8b9ae7c1d350533f032f86f4b4c72cbff9 | |
parent | 0edd3d6c634a577db261615a9dc2719bca7f6e01 (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.c | 3 |
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) | |||
312 | static int | 312 | static int |
313 | z2restore(i_ctx_t *i_ctx_p) | 313 | z2restore(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"); |