summaryrefslogtreecommitdiff
path: root/app-text/ghostscript-gpl/files/VU332928-githash78911a01.patch
diff options
context:
space:
mode:
Diffstat (limited to 'app-text/ghostscript-gpl/files/VU332928-githash78911a01.patch')
-rw-r--r--app-text/ghostscript-gpl/files/VU332928-githash78911a01.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/app-text/ghostscript-gpl/files/VU332928-githash78911a01.patch b/app-text/ghostscript-gpl/files/VU332928-githash78911a01.patch
new file mode 100644
index 00000000..5d4dfde2
--- /dev/null
+++ b/app-text/ghostscript-gpl/files/VU332928-githash78911a01.patch
@@ -0,0 +1,31 @@
+From: Chris Liddell <chris.liddell@artifex.com>
+Date: Thu, 23 Aug 2018 08:54:59 +0000 (+0100)
+Subject: Bug 699654: Check the restore operand type
+X-Git-Tag: ghostpdl-9.24rc1~19
+X-Git-Url: http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff_plain;h=78911a01
+
+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.
+---
+
+diff --git a/psi/zdevice2.c b/psi/zdevice2.c
+index de16dd2..9fbb4e3 100644
+--- a/psi/zdevice2.c
++++ b/psi/zdevice2.c
+@@ -312,6 +312,9 @@ z2grestoreall(i_ctx_t *i_ctx_p)
+ static int
+ z2restore(i_ctx_t *i_ctx_p)
+ {
++ os_ptr op = osp;
++ check_type(*op, t_save);
++
+ while (gs_gstate_saved(gs_gstate_saved(igs))) {
+ if (restore_page_device(igs, gs_gstate_saved(igs)))
+ return push_callout(i_ctx_p, "%restore1pagedevice");