aboutsummaryrefslogtreecommitdiffstats
path: root/main/ghostscript/0002-Bug-700599-Issue-an-error-message-if-an-ExtGstate-is.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/ghostscript/0002-Bug-700599-Issue-an-error-message-if-an-ExtGstate-is.patch')
-rw-r--r--main/ghostscript/0002-Bug-700599-Issue-an-error-message-if-an-ExtGstate-is.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/main/ghostscript/0002-Bug-700599-Issue-an-error-message-if-an-ExtGstate-is.patch b/main/ghostscript/0002-Bug-700599-Issue-an-error-message-if-an-ExtGstate-is.patch
new file mode 100644
index 00000000000..5da83ab565c
--- /dev/null
+++ b/main/ghostscript/0002-Bug-700599-Issue-an-error-message-if-an-ExtGstate-is.patch
@@ -0,0 +1,41 @@
+From: Ray Johnston <ray.johnston@artifex.com>
+Date: Mon, 18 Feb 2019 12:11:45 -0800
+Subject: Bug 700599: Issue an error message if an ExtGstate is not found.
+Origin: http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=be86d2ff2f0f0ea0e365707f3be0fa0c9e7315ee
+Bug: https://bugs.ghostscript.com/show_bug.cgi?id=700599
+
+Previously, this was silently ignored. Only issue a single warning,
+and respect PDFSTOPONERROR to prevent continuing with potentially
+incorrect output.
+
+Note that tests_private/pdf/uploads/bug696410.pdf also now gets this
+error message (ExtGState" instead of ExtGState in object 10).
+---
+ Resource/Init/pdf_draw.ps | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/Resource/Init/pdf_draw.ps b/Resource/Init/pdf_draw.ps
+index 75b5eb622b52..c0201ad65da2 100644
+--- a/Resource/Init/pdf_draw.ps
++++ b/Resource/Init/pdf_draw.ps
+@@ -494,7 +494,16 @@ end
+ dup {
+ oforce exch gsparamdict exch .knownget { exec } { pop } ifelse
+ } forall pop
+- } if
++ } {
++ //pdfdict /.gs_warning_issued known not {
++ (\n **** Error 'gs' ignored -- ExtGState missing from Resources.\n)
++ pdfformaterror
++ ( Output may be incorrect.\n) pdfformaterror
++ //pdfdict /.gs_warning_issued //true .forceput
++ PDFSTOPONERROR { /gs /undefined signalerror } if
++ } if
++ }
++ ifelse
+ } bind executeonly def
+
+ % ------ Transparency support ------ %
+--
+2.20.1
+