[gs-commits] ghostpdl branch, gs9.28, updated. ghostpdl-9.28rc3
[email protected] (Chris Liddell)
| Newsgroups | gmane.comp.printing.ghostscript.cvs |
|---|---|
| Message-ID | <[email protected]> |
The ghostpdl branch, gs9.28 has been updated
via 569a551f2a57f6e6c1e692f6b834c765dcbe7cfa (commit)
via 2ff44c7c8a09dd1c6b7cd750323ee4087b5cebc5 (commit)
via 3695b7f576c607bd3627e6e28dc982fdf68b1b32 (commit)
via 4196e26a9cf3c8afd6c069a789ac649019ae096a (commit)
via 3d55799ea64088e08fc2783012957035c77a66ca (commit)
via 1613502f83ddba352cc8e98e7dd3182c9d7732bc (commit)
via f2d03f59e04a053c14285d8dbdd869bf9a4435e7 (commit)
via 8da8fbaeb6074161bc3a9b22e89265f5942db0d9 (commit)
via 6c6e19334062d12189612b84f53fe393a7808f74 (commit)
via 90bdf83d696562e4136b8f565cac06cc32b161ae (commit)
via a9e997cb97a274bebfc028e8831a43d6f66be0f9 (commit)
via cea41505580dfe55234bd4972fbb09af5e2e6bb8 (commit)
via 89f3d6001728678755aca8c5a02e57bba72a0813 (commit)
via f394c0722d3415ba03f57dc32dcd8484d3173b62 (commit)
via 6cd0b941d86fe54b7e818e563dc702a147bab95a (commit)
from f560f3c468ac187eca8cd55ee46a46e2924e0924 (commit)
----------------------------------------------------------------------
commit 569a551f2a57f6e6c1e692f6b834c765dcbe7cfa
Author: Chris Liddell <[email protected]>
Date: Wed Sep 18 09:24:25 2019 +0100
Dates, docs, etc for 9.28 rc3
diff --git a/base/gscdefs.h b/base/gscdefs.h
index 958be42..95eb831 100644
--- a/base/gscdefs.h
+++ b/base/gscdefs.h
@@ -37,7 +37,7 @@
#ifndef GS_PRODUCT
# define GS_PRODUCT\
- GS_PRODUCTFAMILY " RELEASE CANDIDATE 2"
+ GS_PRODUCTFAMILY " RELEASE CANDIDATE 3"
#endif
/* Prototypes for configuration definitions in gconfig.c. */
diff --git a/base/version.mak b/base/version.mak
index 903e08a..54ce9be 100644
--- a/base/version.mak
+++ b/base/version.mak
@@ -18,7 +18,7 @@ GS_VERSION_MAJOR=9
GS_VERSION_MINOR=28
GS_VERSION_MINOR0=28
# Revision date: year x 10000 + month x 100 + day.
-GS_REVISIONDATE=20190905
+GS_REVISIONDATE=20190918
# Derived values
GS_VERSION=$(GS_VERSION_MAJOR)$(GS_VERSION_MINOR0)
GS_DOT_VERSION=$(GS_VERSION_MAJOR).$(GS_VERSION_MINOR0)
diff --git a/doc/DLL.htm b/doc/DLL.htm
index 7c4380e..9465ad2 100644
--- a/doc/DLL.htm
+++ b/doc/DLL.htm
@@ -776,7 +776,7 @@ or contact Artifex Software, Inc., 1305 Grant Avenue - Suite 200,
Novato, CA 94945, U.S.A., +1(415)492-9861, for further information.
<p>
-<small>Ghostscript version 9.28, 5 September 2019
+<small>Ghostscript version 9.28, 18 September 2019
<!-- [3.0 end visible trailer] ============================================= -->
diff --git a/doc/Deprecated.htm b/doc/Deprecated.htm
index 79b84a1..cecb9d3 100644
--- a/doc/Deprecated.htm
+++ b/doc/Deprecated.htm
@@ -5773,7 +5773,7 @@ or contact Artifex Software, Inc., 1305 Grant Avenue - Suite 200,
Novato, CA 94945, U.S.A., +1(415)492-9861, for further information.
<p>
-<small>Ghostscript version 9.28, 5 September 2019
+<small>Ghostscript version 9.28, 18 September 2019
<!-- [3.0 end visible trailer] ============================================= -->
diff --git a/doc/Develop.htm b/doc/Develop.htm
index f09523d..425238c 100644
--- a/doc/Develop.htm
+++ b/doc/Develop.htm
@@ -4773,7 +4773,7 @@ or contact Artifex Software, Inc., 1305 Grant Avenue - Suite 200,
Novato, CA 94945, U.S.A., +1(415)492-9861, for further information.
<p>
-<small>Ghostscript version 9.28, 5 September 2019
+<small>Ghostscript version 9.28, 18 September 2019
<!-- [3.0 end visible trailer] ============================================= -->
diff --git a/doc/Devices.htm b/doc/Devices.htm
index 7c801e1..8c97096 100644
--- a/doc/Devices.htm
+++ b/doc/Devices.htm
@@ -2015,7 +2015,7 @@ or contact Artifex Software, Inc., 1305 Grant Avenue - Suite 200,
Novato, CA 94945, U.S.A., +1(415)492-9861, for further information.
<p>
-<small>Ghostscript version 9.28, 5 September 2019
+<small>Ghostscript version 9.28, 18 September 2019
<!-- [3.0 end visible trailer] ============================================= -->
diff --git a/doc/Drivers.htm b/doc/Drivers.htm
index 767d8a4..08cb3e4 100644
--- a/doc/Drivers.htm
+++ b/doc/Drivers.htm
@@ -3678,7 +3678,7 @@ or contact Artifex Software, Inc., 1305 Grant Avenue - Suite 200,
Novato, CA 94945, U.S.A., +1(415)492-9861, for further information.
<p>
-<small>Ghostscript version 9.28, 5 September 2019
+<small>Ghostscript version 9.28, 18 September 2019
<!-- [3.0 end visible trailer] ============================================= -->
diff --git a/doc/Fonts.htm b/doc/Fonts.htm
index 1a436d2..946d60f 100644
--- a/doc/Fonts.htm
+++ b/doc/Fonts.htm
@@ -357,7 +357,7 @@ or contact Artifex Software, Inc., 1305 Grant Avenue - Suite 200,
Novato, CA 94945, U.S.A., +1(415)492-9861, for further information.
<p>
-<small>Ghostscript version 9.28, 5 September 2019
+<small>Ghostscript version 9.28, 18 September 2019
<!-- [3.0 end visible trailer] ============================================= -->
diff --git a/doc/History9.htm b/doc/History9.htm
index a1c275d..08369ed 100644
--- a/doc/History9.htm
+++ b/doc/History9.htm
@@ -79,7 +79,7 @@ TOC to see how to edit it for visual conciseness.
<h2>Table of contents</h2>
<blockquote><ul>
-<li><a href="#Version9.28">Version 9.28 (2019-09-05)</a>
+<li><a href="#Version9.28">Version 9.28 (2019-09-18)</a>
<li><a href="#Version9.27">Version 9.27 (2019-04-03)</a>
<li><a href="#Version9.26">Version 9.26 (2018-11-20)</a>
<li><a href="#Version9.25">Version 9.25 (2018-09-13)</a>
@@ -133,7 +133,7 @@ overview</a>.
<!-- [1.0 end visible header] ============================================== -->
<!-- [2.0 begin contents] ================================================== -->
-<h2><a name="Version9.28"></a>Version 9.28 (2019-09-05)</h2>
+<h2><a name="Version9.28"></a>Version 9.28 (2019-09-18)</h2>
<p> Highlights in this release include:
<ul>
<li>
@@ -161,6 +161,10 @@ Our fork will be available as its own package separately from Ghostscript (and M
<li>
<p>The usual round of bug fixes, compatibility changes, and incremental improvements.
</li>
+<li>
+<p>Special thanks to Akira Kakuto, Paul Wessel, William Bader, Nelson H. F. Beebe and
+everyone else who put time and effort into testing this new release.
+</li>
</ul>
<p>For a list of open issues, or to report problems,
please visit <a href="http://bugs.ghostscript.com/">bugs.ghostscript.com</a>.
@@ -196,6 +200,348 @@ at <a href="https://www.mupdf.com">MuPDF</a>.
</li>
</ul>
<h3><a name="9.28_changelog"></a>Changelog</h3>
+
+<p><strong>2019-09-18 09:24:25 +0100
+</strong>
+<br>Chris Liddell <[email protected]><br>
+<a href="http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=0557d5d6628279fc526e9d87f05433800ce1b025">0557d5d6628279fc526e9d87f05433800ce1b025</a>
+<blockquote>
+<p>
+ Dates etc for 9.28 rc3<br>
+<br>
+base/gscdefs.h<br>
+base/version.mak<br>
+doc/DLL.htm<br>
+doc/Deprecated.htm<br>
+doc/Develop.htm<br>
+doc/Devices.htm<br>
+doc/Drivers.htm<br>
+doc/Fonts.htm<br>
+doc/History9.htm<br>
+doc/Install.htm<br>
+doc/Internal.htm<br>
+doc/Language.htm<br>
+doc/Lib.htm<br>
+doc/Make.htm<br>
+doc/News.htm<br>
+doc/Ps-style.htm<br>
+doc/Ps2epsi.htm<br>
+doc/Psfiles.htm<br>
+doc/Readme.htm<br>
+doc/Release.htm<br>
+doc/SavedPages.htm<br>
+doc/Source.htm<br>
+doc/Unix-lpr.htm<br>
+doc/Use.htm<br>
+doc/VectorDevices.htm<br>
+doc/WhatIsGS.htm<br>
+doc/gs-vms.hlp<br>
+doc/sample_downscale_device.htm<br>
+doc/subclass.htm<br>
+doc/thirdparty.htm<br>
+man/dvipdf.1<br>
+man/gs.1<br>
+man/gslp.1<br>
+man/gsnd.1<br>
+man/pdf2dsc.1<br>
+man/pdf2ps.1<br>
+man/pf2afm.1<br>
+man/pfbtopfa.1<br>
+man/printafm.1<br>
+man/ps2ascii.1<br>
+man/ps2epsi.1<br>
+man/ps2pdf.1<br>
+man/ps2pdfwr.1<br>
+man/ps2ps.1<br>
+<p>
+</blockquote>
+<hr>
+<p><strong>2019-09-17 11:42:13 +0100
+</strong>
+<br>Chris Liddell <[email protected]><br>
+<a href="http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=2ff44c7c8a09dd1c6b7cd750323ee4087b5cebc5">2ff44c7c8a09dd1c6b7cd750323ee4087b5cebc5</a>
+<blockquote>
+<p>
+ Fix file permissions interaction with '@' command line<br>
+<br>
+ If an options file (prefixed '@' on the command line) followed something that<br>
+ required initialising the Postscript interpreter (such as a '-c' option),<br>
+ opening the file would potentially fail because file permissions had been<br>
+ activated by the interpreter.<br>
+<br>
+ Add and remove the file from the permit reading list before attempting to open<br>
+ it.<br>
+<br>
+base/gsargs.c<br>
+<p>
+</blockquote>
+<hr>
+<p><strong>2019-09-12 14:23:10 +0100
+</strong>
+<br>Chris Liddell <[email protected]><br>
+<a href="http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=3695b7f576c607bd3627e6e28dc982fdf68b1b32">3695b7f576c607bd3627e6e28dc982fdf68b1b32</a>
+<blockquote>
+<p>
+ If set, add PCLFONTSOURCE value to permit_file_reading list<br>
+<br>
+pcl/pl/pjparse.c<br>
+<p>
+</blockquote>
+<hr>
+<p><strong>2019-09-11 13:07:02 +0100
+</strong>
+<br>Chris Liddell <[email protected]><br>
+<a href="http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=4196e26a9cf3c8afd6c069a789ac649019ae096a">4196e26a9cf3c8afd6c069a789ac649019ae096a</a>
+<blockquote>
+<p>
+ Bug 701561: 'reduce' paths before adding to permit lists<br>
+<br>
+ Before attempting to open files, we pre-process the requested file name to<br>
+ remove surplus/unnecessary elements: i.e. './././file' would be reduced to just<br>
+ './file', or '../dir/../dir/../dir/file' would be reduced to '../dir/file'.<br>
+<br>
+ The 'reduced' path is what we try to open, hence it is also what we check<br>
+ against the file permissions list before we allow files to be accessed.<br>
+<br>
+ That being so, we should also 'reduce' paths as we add them to the permissions<br>
+ lists - thus the permissions list creation and checking are consistent.<br>
+<br>
+base/gslibctx.c<br>
+base/lib.mak<br>
+<p>
+</blockquote>
+<hr>
+<p><strong>2019-09-11 14:10:27 -0700
+</strong>
+<br>Ray Johnston <[email protected]><br>
+<a href="http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=3d55799ea64088e08fc2783012957035c77a66ca">3d55799ea64088e08fc2783012957035c77a66ca</a>
+<blockquote>
+<p>
+ Fix Bug 696333. Allow large bitmaps in clist when writing tile cache.<br>
+<br>
+ When writing bits to update the tile cache, we don't need to restrict to<br>
+ a single command buffer as with the copy_mono and copy_color commands.<br>
+<br>
+ Progressions on:<br>
+ tests_private/comparefiles/Bug694385.pdf.psdcmyk.300.1..gs<br>
+ tests_private/pdf/sumatra/2028_-_invisible_patterns.pdf.psdcmyk.300.1..gs<br>
+ tests_private/ps/ps3cet/09-47B.PS.pdf.pkmraw.300.0..gs_pdf<br>
+ tests_private/ps/ps3fts/176-01.ps.psdcmyk.300.1..gs<br>
+<br>
+base/gxclbits.c<br>
+base/gxcldev.h<br>
+base/gxclrect.c<br>
+<p>
+</blockquote>
+<hr>
+<p><strong>2019-09-12 10:37:42 -0700
+</strong>
+<br>Ray Johnston <[email protected]><br>
+<a href="http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=1613502f83ddba352cc8e98e7dd3182c9d7732bc">1613502f83ddba352cc8e98e7dd3182c9d7732bc</a>
+<blockquote>
+<p>
+ Fix SEGV with flp device and PCL with clist mode and large BandHeight.<br>
+<br>
+ If the 'clist_init' fails initially (with rangecheck) due to the buffer<br>
+ space too small for the BandHeight specified, we loop in the caller after<br>
+ increasing the buffer size, but clist_init left "is_open" false when failing.<br>
+ Add save_is_open in gdev_prn_setup_as_command_list so that we can restore it<br>
+ if the clist_init eventually suceeds.<br>
+<br>
+ The SEGV was with image_data because re-opening the flp device reset the<br>
+ "obsolete" procs to the default, so flp_image_data was replaced by the<br>
+ gx_default_image_data, but no begin_image had been performed (flp_begin_image<br>
+ skipped this since we were not yet at the FirstPage).<br>
+<br>
+base/gdevprn.c<br>
+base/gxclist.c<br>
+<p>
+</blockquote>
+<hr>
+<p><strong>2019-09-16 18:53:49 +0200
+</strong>
+<br>Sebastian Rasmussen <[email protected]><br>
+<a href="http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=f2d03f59e04a053c14285d8dbdd869bf9a4435e7">f2d03f59e04a053c14285d8dbdd869bf9a4435e7</a>
+<blockquote>
+<p>
+ Update jbig2dec stuff for 0.17 release.<br>
+<br>
+jbig2dec/CHANGES<br>
+jbig2dec/jbig2.h<br>
+jbig2dec/jbig2dec.1<br>
+<p>
+</blockquote>
+<hr>
+<p><strong>2019-09-16 18:48:36 +0200
+</strong>
+<br>Sebastian Rasmussen <[email protected]><br>
+<a href="http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=8da8fbaeb6074161bc3a9b22e89265f5942db0d9">8da8fbaeb6074161bc3a9b22e89265f5942db0d9</a>
+<blockquote>
+<p>
+ jbig2dec: Use the same contact information everywhere.<br>
+<br>
+jbig2dec/README<br>
+jbig2dec/configure.ac.in<br>
+jbig2dec/jbig2dec.1<br>
+<p>
+</blockquote>
+<hr>
+<p><strong>2019-09-16 16:12:32 +0100
+</strong>
+<br>Paul Vojta <[email protected]><br>
+<a href="http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=6c6e19334062d12189612b84f53fe393a7808f74">6c6e19334062d12189612b84f53fe393a7808f74</a>
+<blockquote>
+<p>
+ Documentation - fix some typos<br>
+<br>
+ Bug #701589 "Minor documentation problems in 9.28-rc2"<br>
+<br>
+ Thanks to Paul Vojta for pointing these out. Unfortunately we cannot use the<br>
+ supplied patch, as it includes alterations to History9.htm, which is auto-<br>
+ generated from the commit logs. The remaining changes are applied here.<br>
+<br>
+doc/Language.htm<br>
+doc/Use.htm<br>
+<p>
+</blockquote>
+<hr>
+<p><strong>2019-09-11 12:18:51 +0100
+</strong>
+<br>Chris Liddell <[email protected]><br>
+<a href="http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=90bdf83d696562e4136b8f565cac06cc32b161ae">90bdf83d696562e4136b8f565cac06cc32b161ae</a>
+<blockquote>
+<p>
+ Bug 701563: pdfwrite annotation pdfmark /Border key<br>
+<br>
+ Despite the spec saying the values for the /Border key are in user space<br>
+ coordinates, Distiller appears to pass the values through to the output PDF<br>
+ untouched (no rescaling - unlike the values for /Rect, also in user space,<br>
+ according to the spec, which it does scale/translate). Ghostscript/pdfwrite<br>
+ did scale the /Border values.<br>
+<br>
+ This just changes pdfwrite to write the values out unchanged.<br>
+<br>
+devices/vector/gdevpdfm.c<br>
+<p>
+</blockquote>
+<hr>
+<p><strong>2019-09-16 09:56:52 +0100
+</strong>
+<br>Ken Sharp <[email protected]><br>
+<a href="http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=a9e997cb97a274bebfc028e8831a43d6f66be0f9">a9e997cb97a274bebfc028e8831a43d6f66be0f9</a>
+<blockquote>
+<p>
+ Documentation - add a note about SAFER for PDF/X ICC profiles<br>
+<br>
+ Bug #701553 "Examples of PDF/X and PDF/A conversion should be updated for Ghostscript 9.28"<br>
+<br>
+ ICC profiles required for PDF/X and PDF/A output need to be readable<br>
+ in order to work when -dSAFER is true (the new default). This wasn't<br>
+ clear from the documentation, so add a note about it.<br>
+<br>
+ As noted in the bug report, it is possible to embed the profile in the<br>
+ PostScript code, but as Chris says this is probably beyond reasonable<br>
+ expectations of the average user; they simply won't change the example<br>
+ and will then complain that it isn't correct. Users capable of making<br>
+ this work almost certainly have enough knowledge to realise they can<br>
+ do this instead of making the profile readable.<br>
+<br>
+doc/VectorDevices.htm<br>
+<p>
+</blockquote>
+<hr>
+<p><strong>2019-09-12 19:41:47 +0100
+</strong>
+<br>Robin Watts <[email protected]><br>
+<a href="http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=cea41505580dfe55234bd4972fbb09af5e2e6bb8">cea41505580dfe55234bd4972fbb09af5e2e6bb8</a>
+<blockquote>
+<p>
+ Fix various printer devices to properly call spec ops.<br>
+<br>
+ Various printer devices (psd, psdcmykog, tiffsep, tiffscaled)<br>
+ were passing the spec ops on to gx_default_dev_spec_op rather<br>
+ than gdev_prn_dev_spec_op.<br>
+<br>
+ The most obvious implication of this was that we'd sometimes<br>
+ get a warning about printer devices having a private spec op.<br>
+<br>
+devices/gdevcmykog.c<br>
+devices/gdevpsd.c<br>
+devices/gdevtsep.c<br>
+<p>
+</blockquote>
+<hr>
+<p><strong>2019-09-12 17:09:50 +0100
+</strong>
+<br>Robin Watts <[email protected]><br>
+<a href="http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=89f3d6001728678755aca8c5a02e57bba72a0813">89f3d6001728678755aca8c5a02e57bba72a0813</a>
+<blockquote>
+<p>
+ Bug 701568 followup: Fix RLE compressor.<br>
+<br>
+ The previous fix to the RLE compressor reveals an additional<br>
+ existing issue to do with us not checking whether we have<br>
+ space in the buffer to write the EOD byte.<br>
+<br>
+ Fixed here.<br>
+<br>
+base/srle.c<br>
+<p>
+</blockquote>
+<hr>
+<p><strong>2019-09-12 09:35:01 +0100
+</strong>
+<br>Robin Watts <[email protected]><br>
+<a href="http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=f394c0722d3415ba03f57dc32dcd8484d3173b62">f394c0722d3415ba03f57dc32dcd8484d3173b62</a>
+<blockquote>
+<p>
+ Bug 701568: Fix gdevpx.c RLE stream handling.<br>
+<br>
+ The current code in pclxl_write_image_data_RLE passes<br>
+ lines of data to the RLE compression routine. It tells<br>
+ each invocation of that routine that this is the "last"<br>
+ block of data, when clearly it is not.<br>
+<br>
+ Accordingly, the compression routine inserts the "EOD" byte<br>
+ into the stream, and returns EOFC.<br>
+<br>
+ Independently of the return value used, having multiple EOD<br>
+ bytes in the data is clearly wrong. Update the caller to only<br>
+ pass "last" in for the last block.<br>
+<br>
+ The code still returns EOFC at the end of the data, so update<br>
+ this final call to accept (indeed, expect) that return value<br>
+ there.<br>
+<br>
+devices/vector/gdevpx.c<br>
+<p>
+</blockquote>
+<hr>
+<p><strong>2019-09-10 09:04:46 -0700
+</strong>
+<br>Ray Johnston <[email protected]><br>
+<a href="http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=6cd0b941d86fe54b7e818e563dc702a147bab95a">6cd0b941d86fe54b7e818e563dc702a147bab95a</a>
+<blockquote>
+<p>
+ Fix bug 701550, problem with forall on strings.<br>
+<br>
+ Hard to believe, but this problem has existed since at least version 3.33.<br>
+ The 'string_continue' function altered the size which was used to decide if<br>
+ there were still characters to be processed BEFORE invoking the 'push(#)' macro.<br>
+ If the 'push(1)' encountered a full stack segment, it would return stackoverflow<br>
+ so that the operand stack could be extended. This meant that the decision to<br>
+ stop enumerating the string would end early (depending on how many times the<br>
+ stackoverflow occurred).<br>
+<br>
+ Usually the procedure of the forall would either consume the character (reducing<br>
+ the stack), or add an element to the stack triggering the stack extension before<br>
+ the next execution of string_continue, but -c "401 string { dup } forall count ="<br>
+ results in only 800 stack elements (rather than 802 as expected).<br>
+<br>
+psi/zgeneric.c<br>
+<p>
+</blockquote>
+<hr>
<p><strong>2019-08-15 15:54:04 +0100
</strong>
<br>Chris Liddell <[email protected]><br>
@@ -211614,7 +211960,7 @@ or contact Artifex Software, Inc., 1305 Grant Avenue - Suite 200,
Novato, CA 94945, U.S.A., +1(415)492-9861, for further information.
<p>
-<small>Ghostscript version 9.28, 5 September 2019
+<small>Ghostscript version 9.28, 18 September 2019
<!-- [3.0 end visible trailer] ============================================= -->
diff --git a/doc/Install.htm b/doc/Install.htm
index a7e5030..c5f287f 100644
--- a/doc/Install.htm
+++ b/doc/Install.htm
@@ -440,7 +440,7 @@ or contact Artifex Software, Inc., 1305 Grant Avenue - Suite 200,
Novato, CA 94945, U.S.A., +1(415)492-9861, for further information.
<p>
-<small>Ghostscript version 9.28, 5 September 2019
+<small>Ghostscript version 9.28, 18 September 2019
<!-- [3.0 end visible trailer] ============================================= -->
diff --git a/doc/Internal.htm b/doc/Internal.htm
index 21dce53..dd25e65 100644
--- a/doc/Internal.htm
+++ b/doc/Internal.htm
@@ -118,7 +118,7 @@ or contact Artifex Software, Inc., 1305 Grant Avenue - Suite 200,
Novato, CA 94945, U.S.A., +1(415)492-9861, for further information.
<p>
-<small>Ghostscript version 9.28, 5 September 2019
+<small>Ghostscript version 9.28, 18 September 2019
<!-- [3.0 end visible trailer] ============================================= -->
diff --git a/doc/Language.htm b/doc/Language.htm
index 573d23f..e21be74 100644
--- a/doc/Language.htm
+++ b/doc/Language.htm
@@ -1965,7 +1965,7 @@ or contact Artifex Software, Inc., 1305 Grant Avenue - Suite 200,
Novato, CA 94945, U.S.A., +1(415)492-9861, for further information.
<p>
-<small>Ghostscript version 9.28, 5 September 2019
+<small>Ghostscript version 9.28, 18 September 2019
<!-- [3.0 end visible trailer] ============================================= -->
diff --git a/doc/Lib.htm b/doc/Lib.htm
index b3efb73..db311ab 100644
--- a/doc/Lib.htm
+++ b/doc/Lib.htm
@@ -1047,7 +1047,7 @@ or contact Artifex Software, Inc., 1305 Grant Avenue - Suite 200,
Novato, CA 94945, U.S.A., +1(415)492-9861, for further information.
<p>
-<small>Ghostscript version 9.28, 5 September 2019
+<small>Ghostscript version 9.28, 18 September 2019
<!-- [3.0 end visible trailer] ============================================= -->
diff --git a/doc/Make.htm b/doc/Make.htm
index 057df11..d6be720 100644
--- a/doc/Make.htm
+++ b/doc/Make.htm
@@ -1517,7 +1517,7 @@ or contact Artifex Software, Inc., 1305 Grant Avenue - Suite 200,
Novato, CA 94945, U.S.A., +1(415)492-9861, for further information.
<p>
-<small>Ghostscript version 9.28, 5 September 2019
+<small>Ghostscript version 9.28, 18 September 2019
<!-- [3.0 end visible trailer] ============================================= -->
diff --git a/doc/News.htm b/doc/News.htm
index 6169627..20a8abe 100644
--- a/doc/News.htm
+++ b/doc/News.htm
@@ -96,7 +96,7 @@ overview</a>.
<!-- [2.0 begin contents] ================================================== -->
-<h2><a name="Version9.28"></a>Version 9.28 (2019-09-05)</h2>
+<h2><a name="Version9.28"></a>Version 9.28 (2019-09-18)</h2>
<p> Highlights in this release include:
<ul>
<li>
@@ -124,6 +124,10 @@ Our fork will be available as its own package separately from Ghostscript (and M
<li>
<p>The usual round of bug fixes, compatibility changes, and incremental improvements.
</li>
+<li>
+<p>Special thanks to Akira Kakuto, Paul Wessel, William Bader, Nelson H. F. Beebe and
+everyone else who put time and effort into testing this new release.
+</li>
</ul>
<p>For a list of open issues, or to report problems,
please visit <a href="http://bugs.ghostscript.com/">bugs.ghostscript.com</a>.
@@ -183,7 +187,7 @@ or contact Artifex Software, Inc., 1305 Grant Avenue - Suite 200,
Novato, CA 94945, U.S.A., +1(415)492-9861, for further information.
<p>
-<small>Ghostscript version 9.28, 5 September 2019
+<small>Ghostscript version 9.28, 18 September 2019
<!-- [3.0 end visible trailer] ============================================= -->
diff --git a/doc/Ps-style.htm b/doc/Ps-style.htm
index 836822f..64f72dd 100644
--- a/doc/Ps-style.htm
+++ b/doc/Ps-style.htm
@@ -549,7 +549,7 @@ or contact Artifex Software, Inc., 1305 Grant Avenue - Suite 200,
Novato, CA 94945, U.S.A., +1(415)492-9861, for further information.
<p>
-<small>Ghostscript version 9.28, 5 September 2019
+<small>Ghostscript version 9.28, 18 September 2019
<!-- [3.0 end visible trailer] ============================================= -->
diff --git a/doc/Ps2epsi.htm b/doc/Ps2epsi.htm
index c6f5952..133d860 100644
--- a/doc/Ps2epsi.htm
+++ b/doc/Ps2epsi.htm
@@ -229,7 +229,7 @@ or contact Artifex Software, Inc., 1305 Grant Avenue - Suite 200,
Novato, CA 94945, U.S.A., +1(415)492-9861, for further information.
<p>
-<small>Ghostscript version 9.28, 5 September 2019
+<small>Ghostscript version 9.28, 18 September 2019
<!-- [3.0 end visible trailer] ============================================= -->
diff --git a/doc/Psfiles.htm b/doc/Psfiles.htm
index d1b637a..ab716bc 100644
--- a/doc/Psfiles.htm
+++ b/doc/Psfiles.htm
@@ -894,7 +894,7 @@ or contact Artifex Software, Inc., 1305 Grant Avenue - Suite 200,
Novato, CA 94945, U.S.A., +1(415)492-9861, for further information.
<p>
-<small>Ghostscript version 9.28, 5 September 2019
+<small>Ghostscript version 9.28, 18 September 2019
<!-- [3.0 end visible trailer] ============================================= -->
diff --git a/doc/Readme.htm b/doc/Readme.htm
index c8fabae..8f52ace 100644
--- a/doc/Readme.htm
+++ b/doc/Readme.htm
@@ -578,7 +578,7 @@ or contact Artifex Software, Inc., 1305 Grant Avenue - Suite 200,
Novato, CA 94945, U.S.A., +1(415)492-9861, for further information.
<p>
-<small>Ghostscript version 9.28, 5 September 2019
+<small>Ghostscript version 9.28, 18 September 2019
<!-- [3.0 end visible trailer] ============================================= -->
diff --git a/doc/Release.htm b/doc/Release.htm
index 731a93a..2f2c1c9 100644
--- a/doc/Release.htm
+++ b/doc/Release.htm
@@ -845,7 +845,7 @@ or contact Artifex Software, Inc., 1305 Grant Avenue - Suite 200,
Novato, CA 94945, U.S.A., +1(415)492-9861, for further information.
<p>
-<small>Ghostscript version 9.28, 5 September 2019
+<small>Ghostscript version 9.28, 18 September 2019
<!-- [3.0 end visible trailer] ============================================= -->
diff --git a/doc/SavedPages.htm b/doc/SavedPages.htm
index 2fad5a4..d070cd7 100644
--- a/doc/SavedPages.htm
+++ b/doc/SavedPages.htm
@@ -317,7 +317,7 @@ or contact Artifex Software, Inc., 1305 Grant Avenue - Suite 200,
Novato, CA 94945, U.S.A., +1(415)492-9861.
<p>
-<small>Ghostscript version 9.28, 5 September 2019
+<small>Ghostscript version 9.28, 18 September 2019
<!-- [3.0 end visible trailer] ============================================= -->
diff --git a/doc/Source.htm b/doc/Source.htm
index e903003..5bb5c2f 100644
--- a/doc/Source.htm
+++ b/doc/Source.htm
@@ -465,7 +465,7 @@ or contact Artifex Software, Inc., 1305 Grant Avenue - Suite 200,
Novato, CA 94945, U.S.A., +1(415)492-9861, for further information.
<p>
-<small>Ghostscript version 9.28, 5 September 2019
+<small>Ghostscript version 9.28, 18 September 2019
<!-- [3.0 end visible trailer] ============================================= -->
diff --git a/doc/Unix-lpr.htm b/doc/Unix-lpr.htm
index 96b3bdf..2edbe7b 100644
--- a/doc/Unix-lpr.htm
+++ b/doc/Unix-lpr.htm
@@ -304,7 +304,7 @@ or contact Artifex Software, Inc., 1305 Grant Avenue - Suite 200,
Novato, CA 94945, U.S.A., +1(415)492-9861, for further information.
<p>
-<small>Ghostscript version 9.28, 5 September 2019
+<small>Ghostscript version 9.28, 18 September 2019
<!-- [3.0 end visible trailer] ============================================= -->
diff --git a/doc/Use.htm b/doc/Use.htm
index d48804f..d4639ad 100644
--- a/doc/Use.htm
+++ b/doc/Use.htm
@@ -5246,7 +5246,7 @@ or contact Artifex Software, Inc., 1305 Grant Avenue - Suite 200,
Novato, CA 94945, U.S.A., +1(415)492-9861, for further information.
<p>
-<small>Ghostscript version 9.28, 5 September 2019
+<small>Ghostscript version 9.28, 18 September 2019
<!-- [3.0 end visible trailer] ============================================= -->
diff --git a/doc/VectorDevices.htm b/doc/VectorDevices.htm
index c67fb8d..df0cbb4 100644
--- a/doc/VectorDevices.htm
+++ b/doc/VectorDevices.htm
@@ -1396,7 +1396,7 @@ or contact Artifex Software, Inc., 1305 Grant Avenue - Suite 200,
Novato, CA 94945, U.S.A., +1(415)492-9861, for further information.
<p>
-<small>Ghostscript version 9.28, 5 September 2019
+<small>Ghostscript version 9.28, 18 September 2019
<!-- [3.0 end visible trailer] ============================================= -->
diff --git a/doc/WhatIsGS.htm b/doc/WhatIsGS.htm
index 8333de2..deada28 100644
--- a/doc/WhatIsGS.htm
+++ b/doc/WhatIsGS.htm
@@ -189,7 +189,7 @@ or contact Artifex Software, Inc., 1305 Grant Avenue - Suite 200,
Novato, CA 94945, U.S.A., +1(415)492-9861, for further information.
<p>
-<small>Ghostscript version 9.28, 5 September 2019
+<small>Ghostscript version 9.28, 18 September 2019
<!-- [3.0 end visible trailer] ============================================= -->
diff --git a/doc/gs-vms.hlp b/doc/gs-vms.hlp
index f32d3c0..f16cc06 100644
--- a/doc/gs-vms.hlp
+++ b/doc/gs-vms.hlp
@@ -1,6 +1,6 @@
1 gs
gs - GPL Ghostscript interpreter/previewer
-! Ghostscript version 9.28, 5 September 2019
+! Ghostscript version 9.28, 18 September 2019
Usage:
$ gs [options] [file ...]
diff --git a/doc/sample_downscale_device.htm b/doc/sample_downscale_device.htm
index a6e43f4..77d07ad 100644
--- a/doc/sample_downscale_device.htm
+++ b/doc/sample_downscale_device.htm
@@ -263,7 +263,7 @@ or contact Artifex Software, Inc., 1305 Grant Avenue - Suite 200,
Novato, CA 94945, U.S.A., +1(415)492-9861, for further information.
<p>
-<small>Ghostscript version 9.28, 5 September 2019
+<small>Ghostscript version 9.28, 18 September 2019
<!-- [3.0 end visible trailer] ============================================= -->
<!--FINISH EDITING HERE-->
diff --git a/doc/subclass.htm b/doc/subclass.htm
index bad84be..7b8f8d3 100644
--- a/doc/subclass.htm
+++ b/doc/subclass.htm
@@ -812,7 +812,7 @@ or contact Artifex Software, Inc., 1305 Grant Avenue - Suite 200,
Novato, CA 94945, U.S.A., +1(415)492-9861.
<p>
-<small>Ghostscript version 9.28, 5 September 2019
+<small>Ghostscript version 9.28, 18 September 2019
<!-- [3.0 end visible trailer] ============================================= -->
diff --git a/doc/thirdparty.htm b/doc/thirdparty.htm
index c596a0a..541fa71 100644
--- a/doc/thirdparty.htm
+++ b/doc/thirdparty.htm
@@ -268,7 +268,7 @@ or contact Artifex Software, Inc., 1305 Grant Avenue - Suite 200,
Novato, CA 94945, U.S.A., +1(415)492-9861, for further information.
<p>
-<small>Ghostscript version 9.28, 5 September 2019
+<small>Ghostscript version 9.28, 18 September 2019
<!-- [3.0 end visible trailer] ============================================= -->
diff --git a/man/dvipdf.1 b/man/dvipdf.1
index 8e8efd9..4bbf82e 100644
--- a/man/dvipdf.1
+++ b/man/dvipdf.1
@@ -1,4 +1,4 @@
-.TH DVIPDF 1 "5 September 2019" 9.28 Ghostscript \" -*- nroff -*-
+.TH DVIPDF 1 "18 September 2019" 9.28 Ghostscript \" -*- nroff -*-
.SH NAME
dvipdf \- Convert TeX DVI file to PDF using ghostscript and dvips
.SH SYNOPSIS
diff --git a/man/gs.1 b/man/gs.1
index f52738f..4b0015e 100644
--- a/man/gs.1
+++ b/man/gs.1
@@ -1,4 +1,4 @@
-.TH GS 1 "5 September 2019" 9.28 Ghostscript \" -*- nroff -*-
+.TH GS 1 "18 September 2019" 9.28 Ghostscript \" -*- nroff -*-
.SH NAME
gs \- Ghostscript (PostScript and PDF language interpreter and previewer)
.SH SYNOPSIS
diff --git a/man/gslp.1 b/man/gslp.1
index da0d9e7..543ec65 100644
--- a/man/gslp.1
+++ b/man/gslp.1
@@ -1,4 +1,4 @@
-.TH GSLP 1 "5 September 2019" 9.28 Ghostscript \" -*- nroff -*-
+.TH GSLP 1 "18 September 2019" 9.28 Ghostscript \" -*- nroff -*-
.SH NAME
gslp \- Format and print text using ghostscript
.br
diff --git a/man/gsnd.1 b/man/gsnd.1
index d0e5f84..aee58d4 100644
--- a/man/gsnd.1
+++ b/man/gsnd.1
@@ -1,4 +1,4 @@
-.TH GSND 1 "5 September 2019" 9.28 Ghostscript \" -*- nroff -*-
+.TH GSND 1 "18 September 2019" 9.28 Ghostscript \" -*- nroff -*-
.SH NAME
gsnd \- Run ghostscript (PostScript and PDF engine) without display
.SH SYNOPSIS
diff --git a/man/pdf2dsc.1 b/man/pdf2dsc.1
index 4360dd7..dd833c0 100644
--- a/man/pdf2dsc.1
+++ b/man/pdf2dsc.1
@@ -1,4 +1,4 @@
-.TH PDF2DSC 1 "5 September 2019" 9.28 "Ghostscript Tools" \" -*- nroff -*-
+.TH PDF2DSC 1 "18 September 2019" 9.28 "Ghostscript Tools" \" -*- nroff -*-
.SH NAME
pdf2dsc \- generate a PostScript page list of a PDF document
.SH SYNOPSIS
diff --git a/man/pdf2ps.1 b/man/pdf2ps.1
index eb14709..0671351 100644
--- a/man/pdf2ps.1
+++ b/man/pdf2ps.1
@@ -1,4 +1,4 @@
-.TH PDF2PS 1 "5 September 2019" 9.28 "Ghostscript Tools" \" -*- nroff -*-
+.TH PDF2PS 1 "18 September 2019" 9.28 "Ghostscript Tools" \" -*- nroff -*-
.SH NAME
pdf2ps \- Ghostscript PDF to PostScript translator
.SH SYNOPSIS
diff --git a/man/pf2afm.1 b/man/pf2afm.1
index 17e3109..7940c98 100644
--- a/man/pf2afm.1
+++ b/man/pf2afm.1
@@ -1,4 +1,4 @@
-.TH PF2AFM 1 "5 September 2019" 9.28 Ghostscript \" -*- nroff -*-
+.TH PF2AFM 1 "18 September 2019" 9.28 Ghostscript \" -*- nroff -*-
.SH NAME
pf2afm \- Make an AFM file from Postscript (PFB/PFA/PFM) font files using ghostscript
.SH SYNOPSIS
diff --git a/man/pfbtopfa.1 b/man/pfbtopfa.1
index def74c1..4137b22 100644
--- a/man/pfbtopfa.1
+++ b/man/pfbtopfa.1
@@ -1,4 +1,4 @@
-.TH PFBTOPFA 1 "5 September 2019" 9.28 Ghostscript \" -*- nroff -*-
+.TH PFBTOPFA 1 "18 September 2019" 9.28 Ghostscript \" -*- nroff -*-
.SH NAME
pfbtopfa \- Convert Postscript .pfb fonts to .pfa format using ghostscript
.SH SYNOPSIS
diff --git a/man/printafm.1 b/man/printafm.1
index e506cd6..d5dc88c 100644
--- a/man/printafm.1
+++ b/man/printafm.1
@@ -1,4 +1,4 @@
-.TH PRINTAFM 1 "5 September 2019" 9.28 Ghostscript \" -*- nroff -*-
+.TH PRINTAFM 1 "18 September 2019" 9.28 Ghostscript \" -*- nroff -*-
.SH NAME
printafm \- Print the metrics from a Postscript font in AFM format using ghostscript
.SH SYNOPSIS
diff --git a/man/ps2ascii.1 b/man/ps2ascii.1
index c567e8a..2f55cf8 100644
--- a/man/ps2ascii.1
+++ b/man/ps2ascii.1
@@ -1,4 +1,4 @@
-.TH PS2ASCII 1 "5 September 2019" 9.28 "Ghostscript Tools" \" -*- nroff -*-
+.TH PS2ASCII 1 "18 September 2019" 9.28 "Ghostscript Tools" \" -*- nroff -*-
.SH NAME
ps2ascii \- Ghostscript translator from PostScript or PDF to ASCII
.SH SYNOPSIS
diff --git a/man/ps2epsi.1 b/man/ps2epsi.1
index 2ab4fa5..0f52591 100644
--- a/man/ps2epsi.1
+++ b/man/ps2epsi.1
@@ -1,4 +1,4 @@
-.TH PS2EPSI 1 "5 September 2019" 9.28 "Ghostscript Tools" \" -*- nroff -*-
+.TH PS2EPSI 1 "18 September 2019" 9.28 "Ghostscript Tools" \" -*- nroff -*-
.SH NAME
ps2epsi \- generate conforming Encapsulated PostScript
.SH SYNOPSIS
diff --git a/man/ps2pdf.1 b/man/ps2pdf.1
index e1e7d57..2f134a5 100644
--- a/man/ps2pdf.1
+++ b/man/ps2pdf.1
@@ -1,4 +1,4 @@
-.TH PS2PDF 1 "5 September 2019" 9.28 Ghostscript \" -*- nroff -*-
+.TH PS2PDF 1 "18 September 2019" 9.28 Ghostscript \" -*- nroff -*-
.SH NAME
ps2pdf \- Convert PostScript to PDF using ghostscript
.br
diff --git a/man/ps2pdfwr.1 b/man/ps2pdfwr.1
index d29d817..4a4503b 100644
--- a/man/ps2pdfwr.1
+++ b/man/ps2pdfwr.1
@@ -1,4 +1,4 @@
-.TH PS2PDFWR 1 "5 September 2019" 9.28 Ghostscript \" -*- nroff -*-
+.TH PS2PDFWR 1 "18 September 2019" 9.28 Ghostscript \" -*- nroff -*-
.SH NAME
ps2pdfwr \- Convert PostScript to PDF without specifying CompatibilityLevel, using ghostscript
.SH SYNOPSIS
diff --git a/man/ps2ps.1 b/man/ps2ps.1
index 64f8cb2..80c5751 100644
--- a/man/ps2ps.1
+++ b/man/ps2ps.1
@@ -1,4 +1,4 @@
-.TH PS2PS 1 "5 September 2019" 9.28 "Ghostscript Tools" \" -*- nroff -*-
+.TH PS2PS 1 "18 September 2019" 9.28 "Ghostscript Tools" \" -*- nroff -*-
.SH NAME
ps2ps, eps2eps \- Ghostscript PostScript "distiller"
.SH SYNOPSIS
----------------------------------------------------------------------
commit 2ff44c7c8a09dd1c6b7cd750323ee4087b5cebc5
Author: Chris Liddell <[email protected]>
Date: Tue Sep 17 11:42:13 2019 +0100
Fix file permissions interaction with '@' command line
If an options file (prefixed '@' on the command line) followed something that
required initialising the Postscript interpreter (such as a '-c' option),
opening the file would potentially fail because file permissions had been
activated by the interpreter.
Add and remove the file from the permit reading list before attempting to open
it.
diff --git a/base/gsargs.c b/base/gsargs.c
index 9e6ca14..24e9cce 100644
--- a/base/gsargs.c
+++ b/base/gsargs.c
@@ -357,7 +357,12 @@ arg_next(arg_list * pal, const char **argstr, const gs_memory_t *errmem)
return_error(gs_error_Fatal);
}
fname = (char *)*argstr + 1; /* skip @ */
+
+ if (gs_add_control_path(pal->memory, gs_permit_file_reading, fname) < 0)
+ return_error(gs_error_Fatal);
+
f = (*pal->arg_fopen) (fname, pal->fopen_data);
+ DISCARD(gs_remove_control_path(pal->memory, gs_permit_file_reading, fname));
if (f == NULL) {
errprintf(errmem, "Unable to open command line file %s\n", *argstr);
return_error(gs_error_Fatal);
----------------------------------------------------------------------
commit 3695b7f576c607bd3627e6e28dc982fdf68b1b32
Author: Chris Liddell <[email protected]>
Date: Thu Sep 12 14:23:10 2019 +0100
If set, add PCLFONTSOURCE value to permit_file_reading list
diff --git a/pcl/pl/pjparse.c b/pcl/pl/pjparse.c
index ab8f913..c0fd4e7 100644
--- a/pcl/pl/pjparse.c
+++ b/pcl/pl/pjparse.c
@@ -1791,12 +1791,24 @@ pjl_process_init(gs_memory_t * mem)
pathlen = 0;
if ((code = gp_getenv("PCLFONTSOURCE", (char *)0, &pathlen)) < 0) {
char *path =
- (char *)gs_alloc_bytes(mem, pathlen, "pjl_font_path");
+ (char *)gs_alloc_bytes(mem, pathlen + 1, "pjl_font_path");
/* if the allocation fails we use the pjl fontsource */
if (path == NULL)
pjlstate->environment_font_path = NULL;
else {
+ const char * const sepr = gp_file_name_separator();
+ const int lsepr = strlen(sepr);
gp_getenv("PCLFONTSOURCE", path, &pathlen); /* can't fail */
+
+ /* We want to ensure a trailing "/" is present */
+ if (gs_file_name_check_separator(path + (pathlen - (lsepr + 1)), lsepr, path + pathlen - 1) != 1) {
+ strncat(path, gp_file_name_separator(), pathlen + 1);
+ }
+ code = gs_add_control_path(mem, gs_permit_file_reading, path);
+ if (code < 0) {
+ gs_free_object(mem, path, "pjl_font_path");
+ goto fail1;
+ }
pjlstate->environment_font_path = path;
}
} else /* environmet variable does not exist use pjl fontsource */
----------------------------------------------------------------------
commit 4196e26a9cf3c8afd6c069a789ac649019ae096a
Author: Chris Liddell <[email protected]>
Date: Wed Sep 11 13:07:02 2019 +0100
Bug 701561: 'reduce' paths before adding to permit lists
Before attempting to open files, we pre-process the requested file name to
remove surplus/unnecessary elements: i.e. './././file' would be reduced to just
'./file', or '../dir/../dir/../dir/file' would be reduced to '../dir/file'.
The 'reduced' path is what we try to open, hence it is also what we check
against the file permissions list before we allow files to be accessed.
That being so, we should also 'reduce' paths as we add them to the permissions
lists - thus the permissions list creation and checking are consistent.
diff --git a/base/gslibctx.c b/base/gslibctx.c
index 0285651..a72a81d 100644
--- a/base/gslibctx.c
+++ b/base/gslibctx.c
@@ -23,6 +23,7 @@
#include "stdio_.h"
#include "string_.h" /* memset */
#include "gp.h"
+#include "gpmisc.h"
#include "gsicc_manage.h"
#include "gserrors.h"
#include "gscdefs.h" /* for gs_lib_device_list */
@@ -645,6 +646,8 @@ gs_add_control_path_len(const gs_memory_t *mem, gs_path_control_t type, const ch
gs_path_control_set_t *control;
unsigned int n, i;
gs_lib_ctx_core_t *core;
+ char *buffer;
+ uint rlen;
if (mem == NULL || mem->gs_lib_ctx == NULL ||
(core = mem->gs_lib_ctx->core) == NULL)
@@ -664,12 +667,23 @@ gs_add_control_path_len(const gs_memory_t *mem, gs_path_control_t type, const ch
return gs_error_rangecheck;
}
+ rlen = len+1;
+ buffer = (char *)gs_alloc_bytes(core->memory, rlen, "gp_validate_path");
+ if (buffer == NULL)
+ return gs_error_VMerror;
+
+ if (gp_file_name_reduce(path, (uint)len, buffer, &rlen) != gp_combine_success)
+ return gs_error_invalidfileaccess;
+ buffer[rlen] = 0;
+
n = control->num;
for (i = 0; i < n; i++)
{
- if (strncmp(control->paths[i], path, len) == 0 &&
- control->paths[i][len] == 0)
+ if (strncmp(control->paths[i], buffer, rlen) == 0 &&
+ control->paths[i][rlen] == 0) {
+ gs_free_object(core->memory, buffer, "gs_add_control_path_len");
return 0; /* Already there! */
+ }
}
if (control->num == control->max) {
@@ -681,17 +695,16 @@ gs_add_control_path_len(const gs_memory_t *mem, gs_path_control_t type, const ch
p = (char **)gs_alloc_bytes(core->memory, sizeof(*p)*n, "gs_lib_ctx(paths)");
} else
p = (char **)gs_resize_object(core->memory, control->paths, sizeof(*p)*n, "gs_lib_ctx(paths)");
- if (p == NULL)
+ if (p == NULL) {
+ gs_free_object(core->memory, buffer, "gs_add_control_path_len");
return gs_error_VMerror;
+ }
control->paths = p;
control->max = n;
}
n = control->num;
- control->paths[n] = (char *)gs_alloc_bytes(core->memory, len+1, "gs_lib_ctx(path)");
- if (control->paths[n] == NULL)
- return gs_error_VMerror;
- memcpy(control->paths[n], path, len);
+ control->paths[n] = buffer;
control->paths[n][len] = 0;
control->num++;
@@ -710,6 +723,8 @@ gs_remove_control_path_len(const gs_memory_t *mem, gs_path_control_t type, const
gs_path_control_set_t *control;
unsigned int n, i;
gs_lib_ctx_core_t *core;
+ char *buffer;
+ uint rlen;
if (mem == NULL || mem->gs_lib_ctx == NULL ||
(core = mem->gs_lib_ctx->core) == NULL)
@@ -729,12 +744,22 @@ gs_remove_control_path_len(const gs_memory_t *mem, gs_path_control_t type, const
return gs_error_rangecheck;
}
+ rlen = len+1;
+ buffer = (char *)gs_alloc_bytes(core->memory, rlen, "gp_validate_path");
+ if (buffer == NULL)
+ return gs_error_VMerror;
+
+ if (gp_file_name_reduce(path, (uint)len, buffer, &rlen) != gp_combine_success)
+ return gs_error_invalidfileaccess;
+ buffer[rlen] = 0;
+
n = control->num;
for (i = 0; i < n; i++) {
- if (strncmp(control->paths[i], path, len) == 0 &&
+ if (strncmp(control->paths[i], buffer, len) == 0 &&
control->paths[i][len] == 0)
break;
}
+ gs_free_object(core->memory, buffer, "gs_remove_control_path_len");
if (i == n)
return 0;
diff --git a/base/lib.mak b/base/lib.mak
index fc92aa5..5772b8d 100644
--- a/base/lib.mak
+++ b/base/lib.mak
@@ -340,18 +340,18 @@ $(GLOBJ)gsmisc.$(OBJ) : $(GLSRC)gsmisc.c $(AK) $(gx_h) $(gserrors_h)\
$(gdbflags_h) $(LIB_MAK) $(MAKEDIRS)
$(GLCC) $(GLO_)gsmisc.$(OBJ) $(C_) $(GLSRC)gsmisc.c
-$(AUX)gsmisc.$(OBJ) : $(GLSRC)gsmisc.c $(AK) $(gx_h) $(gserrors_h)\
+$(AUX)gsmisc.$(OBJ) : $(GLSRC)gsmisc.c $(AK) $(gx_h) $(gpmisc_h) $(gserrors_h)\
$(vmsmath_h) $(std_h) $(ctype__h) $(malloc__h) $(math__h) $(memory__h)\
$(string__h) $(gpcheck_h) $(gxfarith_h) $(gxfixed_h) $(stdint__h) $(stdio__h)\
$(gdbflags_h) $(LIB_MAK) $(MAKEDIRS)
$(GLCCAUX) $(C_) $(AUXO_)gsmisc.$(OBJ) $(GLSRC)gsmisc.c
-$(GLOBJ)gslibctx_1.$(OBJ) : $(GLSRC)gslibctx.c $(AK) $(gp_h) $(gsmemory_h)\
+$(GLOBJ)gslibctx_1.$(OBJ) : $(GLSRC)gslibctx.c $(AK) $(gp_h) $(gpmisc_h) $(gsmemory_h)\
$(gslibctx_h) $(stdio__h) $(string__h) $(gsicc_manage_h) $(gserrors_h)\
$(gscdefs_h) $(gsstruct_h)
$(GLCC) $(D_)WITH_CAL$(_D) $(I_)$(CALSRCDIR)$(_I) $(GLO_)gslibctx_1.$(OBJ) $(C_) $(GLSRC)gslibctx.c
-$(GLOBJ)gslibctx_0.$(OBJ) : $(GLSRC)gslibctx.c $(AK) $(gp_h) $(gsmemory_h)\
+$(GLOBJ)gslibctx_0.$(OBJ) : $(GLSRC)gslibctx.c $(AK) $(gp_h) $(gpmisc_h) $(gsmemory_h)\
$(gslibctx_h) $(stdio__h) $(string__h) $(gsicc_manage_h) $(gserrors_h)\
$(gscdefs_h) $(gsstruct_h)
$(GLCC) $(GLO_)gslibctx_0.$(OBJ) $(C_) $(GLSRC)gslibctx.c
----------------------------------------------------------------------
commit 3d55799ea64088e08fc2783012957035c77a66ca
Author: Ray Johnston <[email protected]>
Date: Wed Sep 11 14:10:27 2019 -0700
Fix Bug 696333. Allow large bitmaps in clist when writing tile cache.
When writing bits to update the tile cache, we don't need to restrict to
a single command buffer as with the copy_mono and copy_color commands.
Progressions on:
tests_private/comparefiles/Bug694385.pdf.psdcmyk.300.1..gs
tests_private/pdf/sumatra/2028_-_invisible_patterns.pdf.psdcmyk.300.1..gs
tests_private/ps/ps3cet/09-47B.PS.pdf.pkmraw.300.0..gs_pdf
tests_private/ps/ps3fts/176-01.ps.psdcmyk.300.1..gs
diff --git a/base/gxclbits.c b/base/gxclbits.c
index 5572b1f..0d2b46f 100644
--- a/base/gxclbits.c
+++ b/base/gxclbits.c
@@ -150,6 +150,7 @@ cmd_compress_bitmap(stream_state * st, const byte * data, uint width_bits,
* Return <0 if error, otherwise the compression method.
* A return value of gs_error_limitcheck means that the bitmap was too big
* to fit in the command reading buffer.
+ * This won't happen if the compression_mask has allow_large_bitmap set.
* Note that this leaves room for the command and initial arguments,
* but doesn't fill them in.
*/
@@ -159,15 +160,14 @@ cmd_put_bits(gx_device_clist_writer * cldev, gx_clist_state * pcls,
int compression_mask, byte ** pdp, uint * psize)
{
uint short_raster, full_raster;
- uint short_size =
- clist_bitmap_bytes(width_bits, height,
- compression_mask & ~cmd_mask_compress_any,
- &short_raster, &full_raster);
+ uint short_size = clist_bitmap_bytes(width_bits, height,
+ compression_mask & ~cmd_mask_compress_any,
+ &short_raster, &full_raster);
uint uncompressed_raster;
- uint uncompressed_size =
- clist_bitmap_bytes(width_bits, height, compression_mask,
+ uint uncompressed_size = clist_bitmap_bytes(width_bits, height, compression_mask,
&uncompressed_raster, &full_raster);
- uint max_size = data_bits_size - op_size;
+ uint max_size = (compression_mask & allow_large_bitmap) ? 0x7fffffff :
+ data_bits_size - op_size;
gs_memory_t *mem = cldev->memory;
byte *dp;
int compress = 0;
@@ -699,13 +699,15 @@ clist_change_tile(gx_device_clist_writer * cldev, gx_clist_state * pcls,
if (tiles->num_planes != 1)
pdepth /= tiles->num_planes;
+ /* put the bits, but don't restrict to a single buffer */
code = cmd_put_bits(cldev, pcls, ts_bits(cldev, loc.tile),
tiles->rep_width * pdepth,
tiles->rep_height * tiles->num_planes,
loc.tile->cb_raster, rsize,
- (cldev->tile_params.size.x > tiles->rep_width ?
- decompress_elsewhere | decompress_spread :
- decompress_elsewhere),
+ allow_large_bitmap |
+ (cldev->tile_params.size.x > tiles->rep_width ?
+ decompress_elsewhere | decompress_spread :
+ decompress_elsewhere),
&dp, &csize);
if (code < 0)
@@ -790,11 +792,13 @@ clist_change_bits(gx_device_clist_writer * cldev, gx_clist_state * pcls,
pdepth /= loc.tile->num_planes;
if (loc.tile->num_bands == CHAR_ALL_BANDS_COUNT)
bit_pcls = NULL;
+ /* put the bits, but don't restrict to a single buffer */
code = cmd_put_bits(cldev, bit_pcls, ts_bits(cldev, loc.tile),
loc.tile->width * pdepth,
loc.tile->height * loc.tile->num_planes, loc.tile->cb_raster,
rsize,
- decompress_elsewhere | (cldev->target->BLS_force_memory ? (1 << cmd_compress_cfe) : 0),
+ decompress_elsewhere |
+ (cldev->target->BLS_force_memory ? (1 << cmd_compress_cfe) : 0),
&dp, &csize);
if (code < 0)
diff --git a/base/gxcldev.h b/base/gxcldev.h
index 84bfd42..19d19bc 100644
--- a/base/gxcldev.h
+++ b/base/gxcldev.h
@@ -42,6 +42,7 @@
#define cmd_compress_const 3
#define cmd_mask_compress_any\
((1 << cmd_compress_rle) | (1 << cmd_compress_cfe) | (1 << cmd_compress_const))
+
/* Exported by gxclutil.c */
void clist_rle_init(stream_RLE_state *ss);
void clist_rld_init(stream_RLD_state *ss);
@@ -594,6 +595,10 @@ int cmd_write_page_rect_cmd(gx_device_clist_writer * cldev, int op);
*/
#define decompress_spread 0x200
+/* clist_copy_mono and clist_copy_color have a max_size, but tiles to the */
+/* cache do not (clist_change_bits and clist_change_tile). */
+#define allow_large_bitmap 0x400
+
int cmd_put_bits(gx_device_clist_writer * cldev, gx_clist_state * pcls,
const byte * data, uint width_bits, uint height,
uint raster, int op_size, int compression_mask,
diff --git a/base/gxclrect.c b/base/gxclrect.c
index a4b5982..1eaa391 100644
--- a/base/gxclrect.c
+++ b/base/gxclrect.c
@@ -1541,7 +1541,7 @@ clist_strip_copy_rop2(gx_device * dev,
tile_with_id.id = gs_next_ids(dev->memory, 1);
tiles = &tile_with_id;
}
- code = clist_change_tile(cdev, re.pcls, tiles,
+ code = clist_change_bits(cdev, re.pcls, tiles,
(tcolors != 0 ? 1 :
cdev->clist_color_info.depth));
if (code < 0 && !(code == gs_error_limitcheck))
----------------------------------------------------------------------
commit 1613502f83ddba352cc8e98e7dd3182c9d7732bc
Author: Ray Johnston <[email protected]>
Date: Thu Sep 12 10:37:42 2019 -0700
Fix SEGV with flp device and PCL with clist mode and large BandHeight.
If the 'clist_init' fails initially (with rangecheck) due to the buffer
space too small for the BandHeight specified, we loop in the caller after
increasing the buffer size, but clist_init left "is_open" false when failing.
Add save_is_open in gdev_prn_setup_as_command_list so that we can restore it
if the clist_init eventually suceeds.
The SEGV was with image_data because re-opening the flp device reset the
"obsolete" procs to the default, so flp_image_data was replaced by the
gx_default_image_data, but no begin_image had been performed (flp_begin_image
skipped this since we were not yet at the FirstPage).
diff --git a/base/gdevprn.c b/base/gdevprn.c
index b945428..3518ce6 100644
--- a/base/gdevprn.c
+++ b/base/gdevprn.c
@@ -233,6 +233,7 @@ gdev_prn_setup_as_command_list(gx_device *pdev, gs_memory_t *buffer_memory,
gx_device_clist_common * const pcldev = &pclist_dev->common;
bool reallocate = *the_memory != 0;
byte *base;
+ bool save_is_open = pdev->is_open; /* Save around temporary failure in open_c loop */
while (target->parent != NULL) {
target = target->parent;
@@ -303,8 +304,10 @@ open_c:
"cmd list buf(retry open)");
}
ppdev->buf = *the_memory;
- if (base != 0)
+ if (base != 0) {
+ pdev->is_open = save_is_open; /* allow for success when we loop */
goto open_c;
+ }
}
/* Failure. */
if (!reallocate) {
diff --git a/base/gxclist.c b/base/gxclist.c
index 07ed6e9..14b825c 100644
--- a/base/gxclist.c
+++ b/base/gxclist.c
@@ -703,19 +703,22 @@ clist_open(gx_device *dev)
code = clist_init(dev);
if (code < 0)
- return code;
+ goto errxit;
+
cdev->icc_cache_list_len = 0;
cdev->icc_cache_list = NULL;
code = clist_open_output_file(dev);
if ( code >= 0)
code = clist_emit_page_header(dev);
if (code >= 0) {
- dev->is_open = save_is_open;
- } else {
- gs_free_object(cdev->memory->non_gc_memory, cdev->cache_chunk, "free tile cache for clist");
- cdev->cache_chunk = NULL;
+ dev->is_open = save_is_open;
+ return code; /* success */
}
-
+ /* fall through to clean up and return error code */
+errxit:
+ /* prevent leak */
+ gs_free_object(cdev->memory->non_gc_memory, cdev->cache_chunk, "free tile cache for clist");
+ cdev->cache_chunk = NULL;
return code;
}
----------------------------------------------------------------------
commit f2d03f59e04a053c14285d8dbdd869bf9a4435e7
Author: Sebastian Rasmussen <[email protected]>
Date: Mon Sep 16 18:53:49 2019 +0200
Update jbig2dec stuff for 0.17 release.
diff --git a/jbig2dec/CHANGES b/jbig2dec/CHANGES
index a58dcd4..f126ce3 100644
--- a/jbig2dec/CHANGES
+++ b/jbig2dec/CHANGES
@@ -1,3 +1,15 @@
+Version 0.17 (2019 September 16)
+
+* Improved test suite by verifying input file contents and adding
+ all ubc test streams. Fixed bugs where previously missing ubc
+ test streams were decoded incorrectly.
+
+* Bug fixes for a few issues reported by Coverity.
+
+* Moved version number to jbig2.h, and adapted configure
+ correspondingly. Added pkg-config file to be installed
+ along side library.
+
Version 0.16 (2019 April 04)
* API change allowing for library users to get the custom allocator
diff --git a/jbig2dec/jbig2.h b/jbig2dec/jbig2.h
index b05f178..16bb95a 100644
--- a/jbig2dec/jbig2.h
+++ b/jbig2dec/jbig2.h
@@ -26,7 +26,7 @@ extern "C"
#define _JBIG2_H
#define JBIG2_VERSION_MAJOR (0)
-#define JBIG2_VERSION_MINOR (16)
+#define JBIG2_VERSION_MINOR (17)
/* warning levels */
typedef enum {
diff --git a/jbig2dec/jbig2dec.1 b/jbig2dec/jbig2dec.1
index fbaf532..3933d38 100644
--- a/jbig2dec/jbig2dec.1
+++ b/jbig2dec/jbig2dec.1
@@ -1,4 +1,4 @@
-.TH jbig2dec 1 "2019 April 04" "Version 0.16" "jbig2dec Manual"
+.TH jbig2dec 1 "2019 September 17" "Version 0.17" "jbig2dec Manual"
.SH NAME
jbig2dec \- File format converter specialized in JBIG2 decoding
----------------------------------------------------------------------
commit 8da8fbaeb6074161bc3a9b22e89265f5942db0d9
Author: Sebastian Rasmussen <[email protected]>
Date: Mon Sep 16 18:48:36 2019 +0200
jbig2dec: Use the same contact information everywhere.
diff --git a/jbig2dec/README b/jbig2dec/README
index 4d7e345..7a0e53d 100644
--- a/jbig2dec/README
+++ b/jbig2dec/README
@@ -28,4 +28,5 @@ Report bugs at https://bugs.ghostscript.com
For security issues please use the "Security - Other" product,
and for normal bugs the "jbig2dec" product.
-The most suitable mailing list is <[email protected]>.
+Contact the developers at the IRC channel #ghostscript at freenode.net
+or via the mailing list <[email protected]>.
diff --git a/jbig2dec/configure.ac.in b/jbig2dec/configure.ac.in
index 7e93c41..972d081 100644
--- a/jbig2dec/configure.ac.in
+++ b/jbig2dec/configure.ac.in
@@ -1,6 +1,6 @@
# Process this file with autoconf to produce a configure script.
-AC_INIT([jbig2dec], [unknown-version], [[email protected]])
+AC_INIT([jbig2dec], [unknown-version], [[email protected]])
AC_PREREQ(2.53)
AC_CONFIG_SRCDIR([jbig2dec.c])
diff --git a/jbig2dec/jbig2dec.1 b/jbig2dec/jbig2dec.1
index abe305d..fbaf532 100644
--- a/jbig2dec/jbig2dec.1
+++ b/jbig2dec/jbig2dec.1
@@ -63,8 +63,12 @@ Show program version information.
.BR -h " or " --help
Show usage summary.
+.SH REPORTING BUGS
+Report bugs at https://bugs.ghostscript.com
+
+Contact the developers at the IRC channel #ghostscript at freenode.net
+or via the mailing list <[email protected]>.
+
.SH AUTHOR
-jbig2-dev <[email protected]>
This manpage was initially written by Sebastian Rasmussen
-<[email protected]> for jbig2dec and the Debian Project.
-
+<[email protected]> for jbig2dec and the Debian Project.
----------------------------------------------------------------------
commit 6c6e19334062d12189612b84f53fe393a7808f74
Author: Paul Vojta <[email protected]>
Date: Mon Sep 16 16:12:32 2019 +0100
Documentation - fix some typos
Bug #701589 "Minor documentation problems in 9.28-rc2"
Thanks to Paul Vojta for pointing these out. Unfortunately we cannot use the
supplied patch, as it includes alterations to History9.htm, which is auto-
generated from the commit logs. The remaining changes are applied here.
diff --git a/doc/Language.htm b/doc/Language.htm
index ff24562..573d23f 100644
--- a/doc/Language.htm
+++ b/doc/Language.htm
@@ -880,7 +880,7 @@ See also <a href="#LockSafetyParams">.LockSafetyParams</a> and
</dl>
<dl>
-<dt><a name="#addcontrolpath"></a>
+<dt><a name=".addcontrolpath"></a>
<code><name> <string> .addcontrolpath</code></dt>
<dd>
Adds a single path to the file access control lists.
@@ -896,7 +896,7 @@ Adds a single path to the file access control lists.
<p><code>/PermitFileControl</code>
</li>
</ul>
-<p>Whilst the string paramater is the path to be added to the requested list.
+<p>Whilst the string parameter is the path to be added to the requested list.
<p><strong>NOTE: Any attempt to call this operator after <a href="#activatepathcontrol">.activatepathcontrol</a>
has been called will result in a <code>Fatal</code> error, and the interpreter
will immediately exit.</strong>
@@ -904,7 +904,7 @@ will immediately exit.</strong>
</dl>
<dl>
-<dt><a name="#activatepathcontrol"></a>
+<dt><a name=".activatepathcontrol"></a>
<code>.activatepathcontrol</code></dt>
<dd>
Activates file access controls. Once activated, these access controls remain
diff --git a/doc/Use.htm b/doc/Use.htm
index 5b6889b..d48804f 100644
--- a/doc/Use.htm
+++ b/doc/Use.htm
@@ -3449,7 +3449,7 @@ system permissions.</dd>
<dl>
<dt><code>-dSAFER</code></dt>
<dd>
-Enables access controls on files. Access controls fall into three catagories,
+Enables access controls on files. Access controls fall into three categories,
files from which Ghostscript is permitted to read, ones to which it is permitted
to write, and ones over which it has "control" (i.e. delete/rename). These
access controls apply to <strong>all</strong> files accessed via Ghostscript's internal
@@ -3489,10 +3489,10 @@ to do the equivalent of:
<br><code>restore</code>
</blockquote>
<p>
-In that sequence, then <code>Postscript ops</code> would run with <code>SAFER</code> protection
+In that sequence, the <code>Postscript ops</code> would run with <code>SAFER</code> protection
but after the restore, <code>SAFER</code> would no longer be in force. This is no longer the case.
After the call to <code>.setsafe</code> the file controls are in force until the
-interpter exits. As the 9.28 and later implementation no longer restricts the
+interpreter exits. As the 9.28 and later implementation no longer restricts the
operation of <code>setpagedevice</code>, and because this capability is <i>extremely</i>
rarely used, we feel the improvement in security warrants the small reduction in
flexibility.
@@ -3554,7 +3554,7 @@ and on MS Windows it is ";").
Finally, paths supplied on the command line (such as those in <code>-I</code>,
<code>-sFONTPATH</code> parameters) are added to the permitted reading list.
Similarly, paths read during initialisation from <code>Fontmap</code>, <code>cidfmap</code>,
-and the platform specific font file enumeration (i.e. <code>fontconfig</code> on Unix systems)
+and the platform specific font file enumeration (e.g. <code>fontconfig</code> on Unix systems)
are automatically added to the permit read lists.
</dd>
</dl>
----------------------------------------------------------------------
commit 90bdf83d696562e4136b8f565cac06cc32b161ae
Author: Chris Liddell <[email protected]>
Date: Wed Sep 11 12:18:51 2019 +0100
Bug 701563: pdfwrite annotation pdfmark /Border key
Despite the spec saying the values for the /Border key are in user space
coordinates, Distiller appears to pass the values through to the output PDF
untouched (no rescaling - unlike the values for /Rect, also in user space,
according to the spec, which it does scale/translate). Ghostscript/pdfwrite
did scale the /Border values.
This just changes pdfwrite to write the values out unchanged.
diff --git a/devices/vector/gdevpdfm.c b/devices/vector/gdevpdfm.c
index 345b97e..30cc1e1 100644
--- a/devices/vector/gdevpdfm.c
+++ b/devices/vector/gdevpdfm.c
@@ -266,54 +266,16 @@ pdfmark_make_rect(char str[MAX_RECT_STRING], const gs_rect * prect)
str[stell(&s)] = 0;
}
+#define MAX_BORDER_STRING 100
/* Write a transformed Border value on a stream. */
static int
pdfmark_write_border(stream *s, const gs_param_string *str,
const gs_matrix *pctm)
{
- /*
- * We don't preserve the entire CTM in the output, and it isn't clear
- * what CTM is applicable to annotations anyway: we only attempt to
- * handle well-behaved CTMs here.
- */
- uint size = str->size;
-#define MAX_BORDER_STRING 100
- char chars[MAX_BORDER_STRING + 1];
- double bx, by, c;
- gs_point bpt, cpt;
- const char *next;
+ int i;
- if (str->size > MAX_BORDER_STRING)
- return_error(gs_error_limitcheck);
- memcpy(chars, str->data, size);
- chars[size] = 0;
- if (sscanf(chars, "[%lg %lg %lg", &bx, &by, &c) != 3)
- return_error(gs_error_rangecheck);
- gs_distance_transform(bx, by, pctm, &bpt);
- gs_distance_transform(0.0, c, pctm, &cpt);
- pprintg3(s, "[%g %g %g", fabs(bpt.x), fabs(bpt.y), fabs(cpt.x + cpt.y));
- /*
- * We don't attempt to do 100% reliable syntax checking here --
- * it's just not worth the trouble.
- */
- next = strchr(chars + 1, ']');
- if (next == 0)
- return_error(gs_error_rangecheck);
- if (next[1] != 0) {
- /* Handle a dash array. This is tiresome. */
- double v;
-
- stream_putc(s, '[');
- while (next != 0 && sscanf(++next, "%lg", &v) == 1) {
- gs_point vpt;
-
- gs_distance_transform(0.0, v, pctm, &vpt);
- pprintg1(s, "%g ", fabs(vpt.x + vpt.y));
- next = strchr(next, ' ');
- }
- stream_putc(s, ']');
- }
- stream_putc(s, ']');
+ for (i = 0; i < str->size; i++)
+ stream_putc(s, str->data[i]);
return 0;
}
----------------------------------------------------------------------
commit a9e997cb97a274bebfc028e8831a43d6f66be0f9
Author: Ken Sharp <[email protected]>
Date: Mon Sep 16 09:56:52 2019 +0100
Documentation - add a note about SAFER for PDF/X ICC profiles
Bug #701553 "Examples of PDF/X and PDF/A conversion should be updated for Ghostscript 9.28"
ICC profiles required for PDF/X and PDF/A output need to be readable
in order to work when -dSAFER is true (the new default). This wasn't
clear from the documentation, so add a note about it.
As noted in the bug report, it is possible to embed the profile in the
PostScript code, but as Chris says this is probably beyond reasonable
expectations of the average user; they simply won't change the example
and will then complain that it isn't correct. Users capable of making
this work almost certainly have enough knowledge to realise they can
do this instead of making the profile readable.
diff --git a/doc/VectorDevices.htm b/doc/VectorDevices.htm
index 3aecb71..c67fb8d 100644
--- a/doc/VectorDevices.htm
+++ b/doc/VectorDevices.htm
@@ -1145,6 +1145,13 @@ To create a PDF/X-3 document from a Postscript or a PDF file, you should :
</ul>
<p>
+NOTE: Unless <code>-dNOSAFER</code> is specified (NOT reccomended!)
+the ICC profile will be read using the <code>SAFER</code> file permissions; you must ensure that the profile is
+in a directory which is readable according to the <code>SAFER</code> permissions, or that the file itself
+is specifically made readable. See Use.htm for details of how to set file permissions for <code>SAFER</code>.
+</p>
+
+<p>
As mentioned above, the PDF/X definition file provides special information,
which the PDF/X-3 standard requires. You can find a sample file in
<code>gs/lib/PDFX_def.ps</code>, and edit it according to your needs.
----------------------------------------------------------------------
commit cea41505580dfe55234bd4972fbb09af5e2e6bb8
Author: Robin Watts <[email protected]>
Date: Thu Sep 12 19:41:47 2019 +0100
Fix various printer devices to properly call spec ops.
Various printer devices (psd, psdcmykog, tiffsep, tiffscaled)
were passing the spec ops on to gx_default_dev_spec_op rather
than gdev_prn_dev_spec_op.
The most obvious implication of this was that we'd sometimes
get a warning about printer devices having a private spec op.
diff --git a/devices/gdevcmykog.c b/devices/gdevcmykog.c
index 5c900e8..d2f0442 100644
--- a/devices/gdevcmykog.c
+++ b/devices/gdevcmykog.c
@@ -228,7 +228,7 @@ cmykog_dev_spec_op(gx_device *dev_, int op, void *data, int datasize)
if (op == gxdso_supports_devn) {
return true;
}
- return gx_default_dev_spec_op(dev_, op, data, datasize);
+ return gdev_prn_dev_spec_op(dev_, op, data, datasize);
}
/*
diff --git a/devices/gdevpsd.c b/devices/gdevpsd.c
index b1e014b..26580ae 100644
--- a/devices/gdevpsd.c
+++ b/devices/gdevpsd.c
@@ -132,7 +132,7 @@ psd_spec_op(gx_device *dev_, int op, void *data, int datasize)
if (op == gxdso_supports_devn) {
return true;
}
- return gx_default_dev_spec_op(dev_, op, data, datasize);
+ return gdev_prn_dev_spec_op(dev_, op, data, datasize);
}
/* Even though psd_device_finalize is the same as gx_devn_prn_device_finalize,
diff --git a/devices/gdevtsep.c b/devices/gdevtsep.c
index acd7178..d40f074 100644
--- a/devices/gdevtsep.c
+++ b/devices/gdevtsep.c
@@ -96,7 +96,7 @@ tiffscaled_spec_op(gx_device *dev_, int op, void *data, int datasize)
if (op == gxdso_supports_iccpostrender) {
return true;
}
- return gx_default_dev_spec_op(dev_, op, data, datasize);
+ return gdev_prn_dev_spec_op(dev_, op, data, datasize);
}
/* ------ The tiffscaled device ------ */
@@ -524,7 +524,7 @@ tiffsep_spec_op(gx_device *dev_, int op, void *data, int datasize)
if (op == gxdso_supports_iccpostrender || op == gxdso_supports_devn) {
return true;
}
- return gx_default_dev_spec_op(dev_, op, data, datasize);
+ return gdev_prn_dev_spec_op(dev_, op, data, datasize);
}
/* ------ The cmyk devices ------ */
----------------------------------------------------------------------
commit 89f3d6001728678755aca8c5a02e57bba72a0813
Author: Robin Watts <[email protected]>
Date: Thu Sep 12 17:09:50 2019 +0100
Bug 701568 followup: Fix RLE compressor.
The previous fix to the RLE compressor reveals an additional
existing issue to do with us not checking whether we have
space in the buffer to write the EOD byte.
Fixed here.
diff --git a/base/srle.c b/base/srle.c
index 50de0d8..0c0186e 100644
--- a/base/srle.c
+++ b/base/srle.c
@@ -59,7 +59,13 @@ enum {
state_gt_012,
/* -n bytes into a repeated run, n0 and n1 read. */
- state_lt_01
+ state_lt_01,
+
+ /* We have reached the end of data, but not written the marker. */
+ state_eod_unmarked,
+
+ /* We have reached the end of data, and written the marker. */
+ state_eod
};
#ifdef DEBUG_RLE
@@ -294,43 +300,49 @@ run_len_0_n0_read:
}
}
}
- }
- /* n1 is never valid here */
+ /* n1 is never valid here */
- if (last) {
- if (run_len == 0) {
- /* EOD */
+ if (last) {
+ if (run_len == 0) {
+ /* EOD */
+ if (wlimit - q < 1) {
+ ss->state = state_0;
+ goto no_output_room;
+ }
+ } else if (run_len > 0) {
+ /* Flush literal run + EOD */
+ if (wlimit - q < run_len+2) {
+ ss->state = state_0;
+ goto no_output_room;
+ }
+ *++q = run_len;
+ memcpy(q+1, ss->literals, run_len);
+ q += run_len;
+ *++q = n0;
+ } else if (run_len < 0) {
+ /* Flush repeated run + EOD */
+ if (wlimit - q < 3) {
+ ss->state = state_0;
+ goto no_output_room;
+ }
+ *++q = 257+run_len; /* Repeated run */
+ *++q = n0;
+ }
+ case state_eod_unmarked:
if (wlimit - q < 1) {
- ss->state = state_0;
+ ss->state = state_eod_unmarked;
goto no_output_room;
}
- } else if (run_len > 0) {
- /* Flush literal run + EOD */
- if (wlimit - q < run_len+2) {
- ss->state = state_0;
- goto no_output_room;
- }
- *++q = run_len;
- memcpy(q+1, ss->literals, run_len);
- q += run_len;
- *++q = n0;
- } else if (run_len < 0) {
- /* Flush repeated run + EOD */
- if (wlimit - q < 3) {
- ss->state = state_0;
- goto no_output_room;
- }
- *++q = 257+run_len; /* Repeated run */
- *++q = n0;
+ *++q = 128; /* EOD */
+ case state_eod:
+ ss->run_len = 0;
+ ss->state = state_0;
+ pr->ptr = p;
+ pw->ptr = q;
+ ss->record_left = rlimit - p;
+ debug_ate(pinit, p, qinit, q, EOFC);
+ return EOFC;
}
- *++q = 128; /* EOD */
- ss->run_len = 0;
- ss->state = state_0;
- pr->ptr = p;
- pw->ptr = q;
- ss->record_left = rlimit - p;
- debug_ate(pinit, p, qinit, q, EOFC);
- return EOFC;
}
/* Normal exit */
----------------------------------------------------------------------
commit f394c0722d3415ba03f57dc32dcd8484d3173b62
Author: Robin Watts <[email protected]>
Date: Thu Sep 12 09:35:01 2019 +0100
Bug 701568: Fix gdevpx.c RLE stream handling.
The current code in pclxl_write_image_data_RLE passes
lines of data to the RLE compression routine. It tells
each invocation of that routine that this is the "last"
block of data, when clearly it is not.
Accordingly, the compression routine inserts the "EOD" byte
into the stream, and returns EOFC.
Independently of the return value used, having multiple EOD
bytes in the data is clearly wrong. Update the caller to only
pass "last" in for the last block.
The code still returns EOFC at the end of the data, so update
this final call to accept (indeed, expect) that return value
there.
diff --git a/devices/vector/gdevpx.c b/devices/vector/gdevpx.c
index 825e6b4..5d2d0ed 100644
--- a/devices/vector/gdevpx.c
+++ b/devices/vector/gdevpx.c
@@ -714,6 +714,7 @@ pclxl_write_image_data_RLE(gx_device_pclxl * xdev, const byte * base,
uint num_bytes = ROUND_UP(width_bytes, 4) * height;
bool compress = num_bytes >= 8;
int i;
+ int code;
/* cannot handle data_bit not multiple of 8, but we don't invoke this routine that way */
int offset = data_bit >> 3;
@@ -752,19 +753,20 @@ pclxl_write_image_data_RLE(gx_device_pclxl * xdev, const byte * base,
r.ptr = data + i * raster - 1;
r.limit = r.ptr + width_bytes;
if ((*s_RLE_template.process)
- ((stream_state *) & rlstate, &r, &w, true) != 0 ||
+ ((stream_state *) & rlstate, &r, &w, false) != 0 ||
r.ptr != r.limit)
goto ncfree;
r.ptr = (const byte *)"\000\000\000\000\000";
r.limit = r.ptr + (-(int)width_bytes & 3);
if ((*s_RLE_template.process)
- ((stream_state *) & rlstate, &r, &w, true) != 0 ||
+ ((stream_state *) & rlstate, &r, &w, false) != 0 ||
r.ptr != r.limit)
goto ncfree;
}
r.ptr = r.limit;
- if ((*s_RLE_template.process)
- ((stream_state *) & rlstate, &r, &w, true) != 0)
+ code = (*s_RLE_template.process)
+ ((stream_state *) & rlstate, &r, &w, true);
+ if (code != EOFC && code != 0)
goto ncfree;
{
uint count = w.ptr + 1 - buf;
----------------------------------------------------------------------
commit 6cd0b941d86fe54b7e818e563dc702a147bab95a
Author: Ray Johnston <[email protected]>
Date: Tue Sep 10 09:04:46 2019 -0700
Fix bug 701550, problem with forall on strings.
Hard to believe, but this problem has existed since at least version 3.33.
The 'string_continue' function altered the size which was used to decide if
there were still characters to be processed BEFORE invoking the 'push(#)' macro.
If the 'push(1)' encountered a full stack segment, it would return stackoverflow
so that the operand stack could be extended. This meant that the decision to
stop enumerating the string would end early (depending on how many times the
stackoverflow occurred).
Usually the procedure of the forall would either consume the character (reducing
the stack), or add an element to the stack triggering the stack extension before
the next execution of string_continue, but -c "401 string { dup } forall count ="
results in only 800 stack elements (rather than 802 as expected).
diff --git a/psi/zgeneric.c b/psi/zgeneric.c
index 3a5e398..6169e99 100644
--- a/psi/zgeneric.c
+++ b/psi/zgeneric.c
@@ -501,8 +501,8 @@ string_continue(i_ctx_t *i_ctx_p)
es_ptr obj = esp - 1;
if (r_size(obj)) { /* continue */
- r_dec_size(obj, 1);
- push(1);
+ push(1); /* check for result space on stack BEFORE changing string size */
+ r_dec_size(obj, 1); /* Bug 701550 :-O */
make_int(op, *obj->value.bytes);
obj->value.bytes++;
esp += 2;
Summary of changes:
base/gdevprn.c | 5 +-
base/gsargs.c | 5 +
base/gscdefs.h | 2 +-
base/gslibctx.c | 41 ++++-
base/gxclbits.c | 26 +--
base/gxcldev.h | 5 +
base/gxclist.c | 15 +-
base/gxclrect.c | 2 +-
base/lib.mak | 6 +-
base/srle.c | 78 +++++----
base/version.mak | 2 +-
devices/gdevcmykog.c | 2 +-
devices/gdevpsd.c | 2 +-
devices/gdevtsep.c | 4 +-
devices/vector/gdevpdfm.c | 46 +-----
devices/vector/gdevpx.c | 10 +-
doc/DLL.htm | 2 +-
doc/Deprecated.htm | 2 +-
doc/Develop.htm | 2 +-
doc/Devices.htm | 2 +-
doc/Drivers.htm | 2 +-
doc/Fonts.htm | 2 +-
doc/History9.htm | 352 +++++++++++++++++++++++++++++++++++++++-
doc/Install.htm | 2 +-
doc/Internal.htm | 2 +-
doc/Language.htm | 8 +-
doc/Lib.htm | 2 +-
doc/Make.htm | 2 +-
doc/News.htm | 8 +-
doc/Ps-style.htm | 2 +-
doc/Ps2epsi.htm | 2 +-
doc/Psfiles.htm | 2 +-
doc/Readme.htm | 2 +-
doc/Release.htm | 2 +-
doc/SavedPages.htm | 2 +-
doc/Source.htm | 2 +-
doc/Unix-lpr.htm | 2 +-
doc/Use.htm | 10 +-
doc/VectorDevices.htm | 9 +-
doc/WhatIsGS.htm | 2 +-
doc/gs-vms.hlp | 2 +-
doc/sample_downscale_device.htm | 2 +-
doc/subclass.htm | 2 +-
doc/thirdparty.htm | 2 +-
jbig2dec/CHANGES | 12 ++
jbig2dec/README | 3 +-
jbig2dec/configure.ac.in | 2 +-
jbig2dec/jbig2.h | 2 +-
jbig2dec/jbig2dec.1 | 12 +-
man/dvipdf.1 | 2 +-
man/gs.1 | 2 +-
man/gslp.1 | 2 +-
man/gsnd.1 | 2 +-
man/pdf2dsc.1 | 2 +-
man/pdf2ps.1 | 2 +-
man/pf2afm.1 | 2 +-
man/pfbtopfa.1 | 2 +-
man/printafm.1 | 2 +-
man/ps2ascii.1 | 2 +-
man/ps2epsi.1 | 2 +-
man/ps2pdf.1 | 2 +-
man/ps2pdfwr.1 | 2 +-
man/ps2ps.1 | 2 +-
pcl/pl/pjparse.c | 14 +-
psi/zgeneric.c | 4 +-
65 files changed, 584 insertions(+), 177 deletions(-)