Updated to 9.00.

This commit is contained in:
Tim Waugh 2010-09-23 11:57:49 +01:00
parent 970432e3bd
commit 9930de3ed8
23 changed files with 80 additions and 2809 deletions

1
.gitignore vendored
View File

@ -26,3 +26,4 @@ ghostscript-8.63.tar.bz2
ghostscript-8.64.tar.bz2
ghostscript-8.70.tar.xz
ghostscript-8.71.tar.xz
/ghostscript-9.00.tar.xz

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +0,0 @@
diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-debug ghostscript-8.70/cups/gdevcups.c
--- ghostscript-8.70/cups/gdevcups.c.gdevcups-debug 2009-05-20 23:30:48.000000000 +0100
+++ ghostscript-8.70/cups/gdevcups.c 2009-11-24 17:16:11.929250977 +0000
@@ -2816,11 +2816,11 @@ cups_put_params(gx_device *pdev, /*
} \
else if (code == 0) \
{ \
- dprintf2("DEBUG: Setting %s to \"%s\"...\n", sname, \
- (char *)stringval.data); \
strncpy(cups->header.name, (const char *)stringval.data, \
stringval.size); \
cups->header.name[stringval.size] = '\0'; \
+ dprintf2("DEBUG: Setting %s to \"%s\"...\n", sname, \
+ cups->header.name); \
}
#define intoption(name, sname, type) \

View File

@ -1,124 +0,0 @@
diff -up ghostscript-8.70/psi/ialloc.c.CVE-2010-1628 ghostscript-8.70/psi/ialloc.c
--- ghostscript-8.70/psi/ialloc.c.CVE-2010-1628 2008-08-28 23:48:19.000000000 +0100
+++ ghostscript-8.70/psi/ialloc.c 2010-07-16 12:15:45.230948203 +0100
@@ -185,7 +185,14 @@ gs_alloc_ref_array(gs_ref_memory_t * mem
*/
chunk_t *pcc = mem->pcc;
ref *end;
+ alloc_change_t *cp = 0;
+ int code = 0;
+ if ((gs_memory_t *)mem != mem->stable_memory) {
+ code = alloc_save_change_alloc(mem, "gs_alloc_ref_array", &cp);
+ if (code < 0)
+ return code;
+ }
obj = gs_alloc_struct_array((gs_memory_t *) mem, num_refs + 1,
ref, &st_refs, cname);
if (obj == 0)
@@ -210,14 +217,10 @@ gs_alloc_ref_array(gs_ref_memory_t * mem
chunk_locate_ptr(obj, &cl);
cl.cp->has_refs = true;
}
- if ((gs_memory_t *)mem != mem->stable_memory) {
- ref_packed **ppr = 0;
- int code = alloc_save_change_alloc(mem, "gs_alloc_ref_array", &ppr);
- if (code < 0)
- return code;
- if (ppr)
- *ppr = (ref_packed *)obj;
- }
+ if (cp) {
+ mem->changes = cp;
+ cp->where = (ref_packed *)obj;
+ }
}
make_array(parr, attrs | mem->space, num_refs, obj);
return 0;
diff -up ghostscript-8.70/psi/idosave.h.CVE-2010-1628 ghostscript-8.70/psi/idosave.h
--- ghostscript-8.70/psi/idosave.h.CVE-2010-1628 2008-08-28 23:48:19.000000000 +0100
+++ ghostscript-8.70/psi/idosave.h 2010-07-16 12:15:45.238073609 +0100
@@ -18,6 +18,22 @@
# define idosave_INCLUDED
/*
+ * Structure for saved change chain for save/restore. Because of the
+ * garbage collector, we need to distinguish the cases where the change
+ * is in a static object, a dynamic ref, or a dynamic struct.
+ */
+typedef struct alloc_change_s alloc_change_t;
+struct alloc_change_s {
+ alloc_change_t *next;
+ ref_packed *where;
+ ref contents;
+#define AC_OFFSET_STATIC (-2) /* static object */
+#define AC_OFFSET_REF (-1) /* dynamic ref */
+#define AC_OFFSET_ALLOCATED (-3) /* a newly allocated ref array */
+ short offset; /* if >= 0, offset within struct */
+};
+
+/*
* Save a change that must be undone by restore. We have to pass the
* pointer to the containing object to alloc_save_change for two reasons:
*
@@ -29,6 +45,7 @@
* relocate the pointer to it from the change record during garbage
* collection.
*/
+
int alloc_save_change(gs_dual_memory_t *dmem, const ref *pcont,
ref_packed *ptr, client_name_t cname);
int alloc_save_change_in(gs_ref_memory_t *mem, const ref *pcont,
@@ -36,6 +53,6 @@ int alloc_save_change_in(gs_ref_memory_t
/* Remove an AC_OFFSET_ALLOCATED element. */
void alloc_save_remove(gs_ref_memory_t *mem, ref_packed *obj, client_name_t cname);
/* Allocate a structure for recording an allocation event. */
-int alloc_save_change_alloc(gs_ref_memory_t *mem, client_name_t cname, ref_packed ***ppr);
+int alloc_save_change_alloc(gs_ref_memory_t *mem, client_name_t cname, alloc_change_t **pcp);
#endif /* idosave_INCLUDED */
diff -up ghostscript-8.70/psi/isave.c.CVE-2010-1628 ghostscript-8.70/psi/isave.c
--- ghostscript-8.70/psi/isave.c.CVE-2010-1628 2008-08-28 23:48:19.000000000 +0100
+++ ghostscript-8.70/psi/isave.c 2010-07-16 12:15:45.245073557 +0100
@@ -156,22 +156,6 @@ print_save(const char *str, uint spacen,
/* A link to igcref.c . */
ptr_proc_reloc(igc_reloc_ref_ptr_nocheck, ref_packed);
-/*
- * Structure for saved change chain for save/restore. Because of the
- * garbage collector, we need to distinguish the cases where the change
- * is in a static object, a dynamic ref, or a dynamic struct.
- */
-typedef struct alloc_change_s alloc_change_t;
-struct alloc_change_s {
- alloc_change_t *next;
- ref_packed *where;
- ref contents;
-#define AC_OFFSET_STATIC (-2) /* static object */
-#define AC_OFFSET_REF (-1) /* dynamic ref */
-#define AC_OFFSET_ALLOCATED (-3) /* a newly allocated ref array */
- short offset; /* if >= 0, offset within struct */
-};
-
static
CLEAR_MARKS_PROC(change_clear_marks)
{
@@ -519,7 +503,7 @@ alloc_save_change(gs_dual_memory_t * dme
/* Allocate a structure for recording an allocation event. */
int
-alloc_save_change_alloc(gs_ref_memory_t *mem, client_name_t cname, ref_packed ***ppr)
+alloc_save_change_alloc(gs_ref_memory_t *mem, client_name_t cname, alloc_change_t **pcp)
{
register alloc_change_t *cp;
@@ -533,8 +517,7 @@ alloc_save_change_alloc(gs_ref_memory_t
cp->where = 0;
cp->offset = AC_OFFSET_ALLOCATED;
make_null(&cp->contents);
- mem->changes = cp;
- *ppr = &cp->where;
+ *pcp = cp;
return 1;
}

View File

@ -1,704 +0,0 @@
diff -up ghostscript-8.71/base/bcwin32.mak.SEARCH_HERE_FIRST ghostscript-8.71/base/bcwin32.mak
--- ghostscript-8.71/base/bcwin32.mak.SEARCH_HERE_FIRST 2009-11-05 22:24:30.000000000 +0000
+++ ghostscript-8.71/base/bcwin32.mak 2010-08-26 14:42:24.564965845 +0100
@@ -78,13 +78,10 @@ GS_LIB_DEFAULT=$(GSROOTDIR)/Resource/Ini
# Define whether or not searching for initialization files should always
# look in the current directory first. This leads to well-known security
-# and confusion problems, but users insist on it.
-# NOTE: this also affects searching for files named on the command line:
-# see the "File searching" section of Use.htm for full details.
-# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended.
+# and confusion problems, but may be convenient sometimes.
!ifndef SEARCH_HERE_FIRST
-SEARCH_HERE_FIRST=1
+SEARCH_HERE_FIRST=0
!endif
# Define the name of the interpreter initialization file.
diff -up ghostscript-8.71/base/macos-mcp.mak.SEARCH_HERE_FIRST ghostscript-8.71/base/macos-mcp.mak
--- ghostscript-8.71/base/macos-mcp.mak.SEARCH_HERE_FIRST 2009-11-05 22:24:30.000000000 +0000
+++ ghostscript-8.71/base/macos-mcp.mak 2010-08-26 14:42:24.565965206 +0100
@@ -53,12 +53,9 @@ GS_DOCDIR=:doc
# Define whether or not searching for initialization files should always
# look in the current directory first. This leads to well-known security
-# and confusion problems, but users insist on it.
-# NOTE: this also affects searching for files named on the command line:
-# see the "File searching" section of Use.htm for full details.
-# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended.
+# and confusion problems, but may be convenient sometimes.
-SEARCH_HERE_FIRST=1
+SEARCH_HERE_FIRST=0
# Define the name of the interpreter initialization file.
# (There is no reason to change this.)
diff -up ghostscript-8.71/base/macosx.mak.SEARCH_HERE_FIRST ghostscript-8.71/base/macosx.mak
--- ghostscript-8.71/base/macosx.mak.SEARCH_HERE_FIRST 2008-10-02 20:33:22.000000000 +0100
+++ ghostscript-8.71/base/macosx.mak 2010-08-26 14:42:24.567964998 +0100
@@ -78,12 +78,9 @@ GS_LIB_DEFAULT=$(gsdatadir)/Resource/Ini
# Define whether or not searching for initialization files should always
# look in the current directory first. This leads to well-known security
-# and confusion problems, but users insist on it.
-# NOTE: this also affects searching for files named on the command line:
-# see the "File searching" section of Use.htm for full details.
-# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended.
+# and confusion problems, but may be convenient sometimes.
-SEARCH_HERE_FIRST=1
+SEARCH_HERE_FIRST=0
# Define the name of the interpreter initialization file.
# (There is no reason to change this.)
diff -up ghostscript-8.71/base/Makefile.in.SEARCH_HERE_FIRST ghostscript-8.71/base/Makefile.in
--- ghostscript-8.71/base/Makefile.in.SEARCH_HERE_FIRST 2009-12-18 07:04:10.000000000 +0000
+++ ghostscript-8.71/base/Makefile.in 2010-08-26 14:42:24.568840684 +0100
@@ -96,12 +96,9 @@ GS_CACHE_DIR="~/.ghostscript/cache/"
# Define whether or not searching for initialization files should always
# look in the current directory first. This leads to well-known security
-# and confusion problems, but users insist on it.
-# NOTE: this also affects searching for files named on the command line:
-# see the "File searching" section of Use.htm for full details.
-# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended.
+# and confusion problems, but may be convenient sometimes.
-SEARCH_HERE_FIRST=1
+SEARCH_HERE_FIRST=0
# Define the name of the interpreter initialization file.
# (There is no reason to change this.)
diff -up ghostscript-8.71/base/msvclib.mak.SEARCH_HERE_FIRST ghostscript-8.71/base/msvclib.mak
--- ghostscript-8.71/base/msvclib.mak.SEARCH_HERE_FIRST 2010-01-07 10:53:36.000000000 +0000
+++ ghostscript-8.71/base/msvclib.mak 2010-08-26 14:42:24.570840275 +0100
@@ -49,13 +49,10 @@ GS_LIB_DEFAULT=$(GSROOTDIR)/Resource/Ini
# Define whether or not searching for initialization files should always
# look in the current directory first. This leads to well-known security
-# and confusion problems, but users insist on it.
-# NOTE: this also affects searching for files named on the command line:
-# see the "File searching" section of Use.htm for full details.
-# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended.
+# and confusion problems, but may be convenient sometimes.
!ifndef SEARCH_HERE_FIRST
-SEARCH_HERE_FIRST=1
+SEARCH_HERE_FIRST=0
!endif
# Define the name of the interpreter initialization file.
diff -up ghostscript-8.71/base/openvms.mak.SEARCH_HERE_FIRST ghostscript-8.71/base/openvms.mak
--- ghostscript-8.71/base/openvms.mak.SEARCH_HERE_FIRST 2009-11-05 22:24:30.000000000 +0000
+++ ghostscript-8.71/base/openvms.mak 2010-08-26 14:42:24.571840163 +0100
@@ -68,12 +68,9 @@ GS_LIB_DEFAULT=GS_ROOT:[RESOURCE.INIT],G
# Define whether or not searching for initialization files should always
# look in the current directory first. This leads to well-known security
-# and confusion problems, but users insist on it.
-# NOTE: this also affects searching for files named on the command line:
-# see the "File searching" section of Use.htm for full details.
-# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended.
+# and confusion problems, but may be convenient sometimes.
-SEARCH_HERE_FIRST=1
+SEARCH_HERE_FIRST=0
# Define the name of the interpreter initialization file.
# (There is no reason to change this.)
diff -up ghostscript-8.71/base/openvms.mmk.SEARCH_HERE_FIRST ghostscript-8.71/base/openvms.mmk
--- ghostscript-8.71/base/openvms.mmk.SEARCH_HERE_FIRST 2009-01-08 09:17:18.000000000 +0000
+++ ghostscript-8.71/base/openvms.mmk 2010-08-26 14:42:24.572840641 +0100
@@ -73,12 +73,9 @@ GS_LIB_DEFAULT=GS_LIB
# Define whether or not searching for initialization files should always
# look in the current directory first. This leads to well-known security
-# and confusion problems, but users insist on it.
-# NOTE: this also affects searching for files named on the command line:
-# see the "File searching" section of Use.htm for full details.
-# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended.
+# and confusion problems, but may be convenient sometimes.
-SEARCH_HERE_FIRST=1
+SEARCH_HERE_FIRST=0
# Define the name of the interpreter initialization file.
# (There is no reason to change this.)
diff -up ghostscript-8.71/base/ugcclib.mak.SEARCH_HERE_FIRST ghostscript-8.71/base/ugcclib.mak
--- ghostscript-8.71/base/ugcclib.mak.SEARCH_HERE_FIRST 2008-11-05 20:41:22.000000000 +0000
+++ ghostscript-8.71/base/ugcclib.mak 2010-08-26 14:42:24.573840607 +0100
@@ -30,7 +30,7 @@ gsdir = /usr/local/share/ghostscript
gsdatadir = $(gsdir)/$(GS_DOT_VERSION)
GS_DOCDIR=$(gsdatadir)/doc
GS_LIB_DEFAULT=$(gsdatadir)/Resource/Init:$(gsdatadir)/lib:$(gsdatadir)/Resource/Font
-SEARCH_HERE_FIRST=1
+SEARCH_HERE_FIRST=0
GS_INIT=gs_init.ps
#GENOPT=-DDEBUG
diff -up ghostscript-8.71/base/unixansi.mak.SEARCH_HERE_FIRST ghostscript-8.71/base/unixansi.mak
--- ghostscript-8.71/base/unixansi.mak.SEARCH_HERE_FIRST 2009-11-05 22:24:30.000000000 +0000
+++ ghostscript-8.71/base/unixansi.mak 2010-08-26 14:42:24.575840435 +0100
@@ -73,12 +73,9 @@ GS_LIB_DEFAULT=$(gsdatadir)/Resource/Ini
# Define whether or not searching for initialization files should always
# look in the current directory first. This leads to well-known security
-# and confusion problems, but users insist on it.
-# NOTE: this also affects searching for files named on the command line:
-# see the "File searching" section of Use.htm for full details.
-# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended.
+# and confusion problems, but may be convenient sometimes.
-SEARCH_HERE_FIRST=1
+SEARCH_HERE_FIRST=0
# Define the name of the interpreter initialization file.
# (There is no reason to change this.)
diff -up ghostscript-8.71/base/unix-gcc.mak.SEARCH_HERE_FIRST ghostscript-8.71/base/unix-gcc.mak
--- ghostscript-8.71/base/unix-gcc.mak.SEARCH_HERE_FIRST 2009-11-11 15:50:28.000000000 +0000
+++ ghostscript-8.71/base/unix-gcc.mak 2010-08-26 14:42:24.576840199 +0100
@@ -77,12 +77,9 @@ GS_LIB_DEFAULT=$(gsdatadir)/Resource/Ini
# Define whether or not searching for initialization files should always
# look in the current directory first. This leads to well-known security
-# and confusion problems, but users insist on it.
-# NOTE: this also affects searching for files named on the command line:
-# see the "File searching" section of Use.htm for full details.
-# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended.
+# and confusion problems, but may be convenient sometimes.
-SEARCH_HERE_FIRST=1
+SEARCH_HERE_FIRST=0
# Define the name of the interpreter initialization file.
# (There is no reason to change this.)
diff -up ghostscript-8.71/base/watclib.mak.SEARCH_HERE_FIRST ghostscript-8.71/base/watclib.mak
--- ghostscript-8.71/base/watclib.mak.SEARCH_HERE_FIRST 2009-01-08 09:17:18.000000000 +0000
+++ ghostscript-8.71/base/watclib.mak 2010-08-26 14:42:24.577840314 +0100
@@ -20,7 +20,7 @@ AROOTDIR=c:/gs
GSROOTDIR=$(AROOTDIR)/gs$(GS_DOT_VERSION)
GS_DOCDIR=$(GSROOTDIR)/doc
GS_LIB_DEFAULT=$(GSROOTDIR)/Resource/Init\;$(GSROOTDIR)/lib\;$(GSROOTDIR)/Resource/Font\;$(AROOTDIR)/fonts
-SEARCH_HERE_FIRST=1
+SEARCH_HERE_FIRST=0
GS_INIT=gs_init.ps
!ifndef DEBUG
diff -up ghostscript-8.71/base/watcw32.mak.SEARCH_HERE_FIRST ghostscript-8.71/base/watcw32.mak
--- ghostscript-8.71/base/watcw32.mak.SEARCH_HERE_FIRST 2009-11-05 22:24:30.000000000 +0000
+++ ghostscript-8.71/base/watcw32.mak 2010-08-26 14:42:24.578840893 +0100
@@ -54,11 +54,8 @@ GS_LIB_DEFAULT=$(GSROOTDIR)/Resource/Ini
# Define whether or not searching for initialization files should always
# look in the current directory first. This leads to well-known security
# and confusion problems, but users insist on it.
-# NOTE: this also affects searching for files named on the command line:
-# see the "File searching" section of Use.htm for full details.
-# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended.
-SEARCH_HERE_FIRST=1
+SEARCH_HERE_FIRST=0
# Define the name of the interpreter initialization file.
# (There is no reason to change this.)
diff -up ghostscript-8.71/doc/Use.htm.SEARCH_HERE_FIRST ghostscript-8.71/doc/Use.htm
--- ghostscript-8.71/doc/Use.htm.SEARCH_HERE_FIRST 2010-02-10 18:17:48.000000000 +0000
+++ ghostscript-8.71/doc/Use.htm 2010-08-26 14:42:24.583840122 +0100
@@ -823,8 +823,8 @@ file name specifies an absolute path.
using the name given. Otherwise it tries directories in this order:
<ol>
-<li>The current directory (unless disabled by the
-<a href="#P-_switch"><code>-P-</code> switch</a>);
+<li>The current directory if enabled by the
+<a href="#P-_switch"><code>-P</code> switch</a>;
<li>The directories specified by <a href="#I_switch"><code>-I</code>
switches</a> in the command line, if any;
@@ -847,13 +847,10 @@ into the executable ;
directory or a list of directories separated by a character appropriate for
the operating system ("<code>:</code>" on Unix systems,
"<code>,</code>" on VMS systems, and
-"<code>;</code>" on MS Windows systems). We think that trying
-the current directory first is a very bad idea -- it opens serious security
-loopholes and can lead to very confusing errors if one has more than one
-version of Ghostscript in one's environment -- but when we attempted to
-change it, users insisted that we change it back. You can disable looking
-in the current directory first by using the
-<a href="#P_switch"><code>-P-</code> switch</a>.
+"<code>;</code>" on MS Windows systems).
+By default, Ghostscript no longer searches the current directory first
+but provides <a href="#P_switch"><code>-P</code> switch</a> for a degree
+of backward compatibility.
<p>
Note that Ghostscript does not use this file searching algorithm for the
@@ -2061,14 +2058,14 @@ for library files.
<dl>
<dt><a name="P_switch"></a><code>-P</code>
<dd>Makes Ghostscript look first in the current directory for library
-files. This is currently the default.
+files.
</dl>
<dl>
<dt><a name="P-_switch"></a><code>-P-</code>
<dd>Makes Ghostscript <b><em>not</em></b> look first in the current
directory for library files (unless, of course, the first explicitly
-supplied directory is "<code>.</code>").
+supplied directory is "<code>.</code>"). This is now the default.
</dl>
<h4><a name="Parameters"></a>Setting parameters</h4>
diff -up ghostscript-8.71/man/gs.1.SEARCH_HERE_FIRST ghostscript-8.71/man/gs.1
--- ghostscript-8.71/man/gs.1.SEARCH_HERE_FIRST 2010-02-10 18:17:48.000000000 +0000
+++ ghostscript-8.71/man/gs.1 2010-08-26 14:42:24.586965259 +0100
@@ -208,6 +208,12 @@ whereas \fB\-sname=35\fR is equivalent t
.br
/name (35) def
.TP
+.B \-P
+Makes Ghostscript to look first in the current directory for library files.
+By default, Ghostscript no longer looks in the current directory,
+unless, of course, the first explicitly supplied directory is "." in \fB-I\fR.
+See also the \fBINITIALIZATION FILES\fR section below, and bundled
+\fBUse.htm\fR for detailed discussion on search paths and how Ghostcript finds files.
.B \-q
Quiet startup: suppress normal startup messages, and also do the
equivalent of \fB\-dQUIET\fR.
diff -up ghostscript-8.71/psi/msvc32.mak.SEARCH_HERE_FIRST ghostscript-8.71/psi/msvc32.mak
--- ghostscript-8.71/psi/msvc32.mak.SEARCH_HERE_FIRST 2010-02-02 18:14:37.000000000 +0000
+++ ghostscript-8.71/psi/msvc32.mak 2010-08-26 14:42:24.588840343 +0100
@@ -100,13 +100,10 @@ GS_LIB_DEFAULT=$(GSROOTDIR)/Resource/Ini
# Define whether or not searching for initialization files should always
# look in the current directory first. This leads to well-known security
-# and confusion problems, but users insist on it.
-# NOTE: this also affects searching for files named on the command line:
-# see the "File searching" section of Use.htm for full details.
-# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended.
+# and confusion problems, but may be convenient sometimes.
!ifndef SEARCH_HERE_FIRST
-SEARCH_HERE_FIRST=1
+SEARCH_HERE_FIRST=0
!endif
# Define the name of the interpreter initialization file.
diff -up ghostscript-8.71/psi/os2.mak.SEARCH_HERE_FIRST ghostscript-8.71/psi/os2.mak
--- ghostscript-8.71/psi/os2.mak.SEARCH_HERE_FIRST 2009-11-05 22:24:30.000000000 +0000
+++ ghostscript-8.71/psi/os2.mak 2010-08-26 14:42:24.590840867 +0100
@@ -54,12 +54,9 @@ GS_LIB_DEFAULT=$(GSROOTDIR)/Resource/Ini
# Define whether or not searching for initialization files should always
# look in the current directory first. This leads to well-known security
-# and confusion problems, but users insist on it.
-# NOTE: this also affects searching for files named on the command line:
-# see the "File searching" section of Use.htm for full details.
-# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended.
+# and confusion problems, but may be convenient sometimes.
-SEARCH_HERE_FIRST=1
+SEARCH_HERE_FIRST=0
# Define the name of the interpreter initialization file.
# (There is no reason to change this.)
diff -up ghostscript-8.71/psi/zfile.c.SEARCH_HERE_FIRST ghostscript-8.71/psi/zfile.c
--- ghostscript-8.71/psi/zfile.c.SEARCH_HERE_FIRST 2009-10-04 13:42:07.000000000 +0100
+++ ghostscript-8.71/psi/zfile.c 2010-08-26 14:42:24.593842556 +0100
@@ -486,8 +486,13 @@ zstatus(i_ctx_t *i_ctx_p)
struct stat fstat;
int code = parse_file_name(op, &pname, i_ctx_p->LockFilePermissions);
- if (code < 0)
+ if (code < 0) {
+ if (code == e_undefinedfilename) {
+ make_bool(op, 0);
+ code = 0;
+ }
return code;
+ }
code = gs_terminate_file_name(&pname, imemory, "status");
if (code < 0)
return code;
@@ -903,6 +908,91 @@ check_file_permissions_aux(i_ctx_t *i_ct
}
+/* return zero for success, -ve for error, +1 for continue */
+static int
+lib_file_open_search_with_no_combine(gs_file_path_ptr lib_path, const gs_memory_t *mem, i_ctx_t *i_ctx_p,
+ const char *fname, uint flen, char *buffer, int blen, uint *pclen, ref *pfile,
+ gx_io_device *iodev, bool starting_arg_file, char *fmode)
+{
+ stream *s;
+ uint blen1 = blen;
+ if (gp_file_name_reduce(fname, flen, buffer, &blen1) != gp_combine_success)
+ goto skip;
+ if (iodev_os_open_file(iodev, (const char *)buffer, blen1,
+ (const char *)fmode, &s, (gs_memory_t *)mem) == 0) {
+ if (starting_arg_file ||
+ check_file_permissions_aux(i_ctx_p, buffer, blen1) >= 0) {
+ *pclen = blen1;
+ make_stream_file(pfile, s, "r");
+ return 0;
+ }
+ sclose(s);
+ return_error(e_invalidfileaccess);
+ }
+ skip:;
+ return 1;
+}
+
+/* return zero for success, -ve for error, +1 for continue */
+static int
+lib_file_open_search_with_combine(gs_file_path_ptr lib_path, const gs_memory_t *mem, i_ctx_t *i_ctx_p,
+ const char *fname, uint flen, char *buffer, int blen, uint *pclen, ref *pfile,
+ gx_io_device *iodev, bool starting_arg_file, char *fmode)
+{
+ stream *s;
+ const gs_file_path *pfpath = lib_path;
+ uint pi;
+
+ for (pi = 0; pi < r_size(&pfpath->list); ++pi) {
+ const ref *prdir = pfpath->list.value.refs + pi;
+ const char *pstr = (const char *)prdir->value.const_bytes;
+ uint plen = r_size(prdir), blen1 = blen;
+ gs_parsed_file_name_t pname;
+ gp_file_name_combine_result r;
+
+ /* We need to concatenate and parse the file name here
+ * if this path has a %device% prefix. */
+ if (pstr[0] == '%') {
+ int code;
+
+ /* We concatenate directly since gp_file_name_combine_*
+ * rules are not correct for other devices such as %rom% */
+ code = gs_parse_file_name(&pname, pstr, plen);
+ if (code < 0)
+ continue;
+ memcpy(buffer, pname.fname, pname.len);
+ memcpy(buffer+pname.len, fname, flen);
+ code = pname.iodev->procs.open_file(pname.iodev, buffer, pname.len + flen, fmode,
+ &s, (gs_memory_t *)mem);
+ if (code < 0)
+ continue;
+ make_stream_file(pfile, s, "r");
+ /* fill in the buffer with the device concatenated */
+ memcpy(buffer, pstr, plen);
+ memcpy(buffer+plen, fname, flen);
+ *pclen = plen + flen;
+ return 0;
+ } else {
+ r = gp_file_name_combine(pstr, plen,
+ fname, flen, false, buffer, &blen1);
+ if (r != gp_combine_success)
+ continue;
+ if (iodev_os_open_file(iodev, (const char *)buffer, blen1, (const char *)fmode,
+ &s, (gs_memory_t *)mem) == 0) {
+ if (starting_arg_file ||
+ check_file_permissions_aux(i_ctx_p, buffer, blen1) >= 0) {
+ *pclen = blen1;
+ make_stream_file(pfile, s, "r");
+ return 0;
+ }
+ sclose(s);
+ return_error(e_invalidfileaccess);
+ }
+ }
+ }
+ return 1;
+}
+
/* Return a file object of of the file searched for using the search paths. */
/* The fname cannot contain a device part (%...%) but the lib paths might. */
/* The startup code calls this to open the initialization file gs_init.ps. */
@@ -917,8 +1007,9 @@ lib_file_open(gs_file_path_ptr lib_path
bool search_with_no_combine = false;
bool search_with_combine = false;
char fmode[4] = { 'r', 0, 0, 0 }; /* room for binary suffix */
- stream *s;
gx_io_device *iodev = iodev_default;
+ gs_main_instance *minst = get_minst_from_memory(mem);
+ int code;
/* when starting arg files (@ files) iodev_default is not yet set */
if (iodev == 0)
@@ -932,75 +1023,36 @@ lib_file_open(gs_file_path_ptr lib_path
search_with_no_combine = starting_arg_file;
search_with_combine = true;
}
- if (search_with_no_combine) {
- uint blen1 = blen;
-
- if (gp_file_name_reduce(fname, flen, buffer, &blen1) != gp_combine_success)
- goto skip;
- if (iodev_os_open_file(iodev, (const char *)buffer, blen1,
- (const char *)fmode, &s, (gs_memory_t *)mem) == 0) {
- if (starting_arg_file ||
- check_file_permissions_aux(i_ctx_p, buffer, blen1) >= 0) {
- *pclen = blen1;
- make_stream_file(pfile, s, "r");
- return 0;
- }
- sclose(s);
- return_error(e_invalidfileaccess);
- }
- skip:;
- }
- if (search_with_combine) {
- const gs_file_path *pfpath = lib_path;
- uint pi;
-
- for (pi = 0; pi < r_size(&pfpath->list); ++pi) {
- const ref *prdir = pfpath->list.value.refs + pi;
- const char *pstr = (const char *)prdir->value.const_bytes;
- uint plen = r_size(prdir), blen1 = blen;
- gs_parsed_file_name_t pname;
- gp_file_name_combine_result r;
-
- /* We need to concatenate and parse the file name here
- * if this path has a %device% prefix. */
- if (pstr[0] == '%') {
- int code;
-
- /* We concatenate directly since gp_file_name_combine_*
- * rules are not correct for other devices such as %rom% */
- code = gs_parse_file_name(&pname, pstr, plen);
- if (code < 0)
- continue;
- memcpy(buffer, pname.fname, pname.len);
- memcpy(buffer+pname.len, fname, flen);
- code = pname.iodev->procs.open_file(pname.iodev, buffer, pname.len + flen, fmode,
- &s, (gs_memory_t *)mem);
- if (code < 0)
- continue;
- make_stream_file(pfile, s, "r");
- /* fill in the buffer with the device concatenated */
- memcpy(buffer, pstr, plen);
- memcpy(buffer+plen, fname, flen);
- *pclen = plen + flen;
- return 0;
- } else {
- r = gp_file_name_combine(pstr, plen,
- fname, flen, false, buffer, &blen1);
- if (r != gp_combine_success)
- continue;
- if (iodev_os_open_file(iodev, (const char *)buffer, blen1, (const char *)fmode,
- &s, (gs_memory_t *)mem) == 0) {
- if (starting_arg_file ||
- check_file_permissions_aux(i_ctx_p, buffer, blen1) >= 0) {
- *pclen = blen1;
- make_stream_file(pfile, s, "r");
- return 0;
- }
- sclose(s);
- return_error(e_invalidfileaccess);
- }
- }
- }
+ if (minst->search_here_first) {
+ if (search_with_no_combine) {
+ code = lib_file_open_search_with_no_combine(lib_path, mem, i_ctx_p,
+ fname, flen, buffer, blen, pclen, pfile,
+ iodev, starting_arg_file, fmode);
+ if (code <= 0) /* +ve means continue continue */
+ return code;
+ }
+ if (search_with_combine) {
+ code = lib_file_open_search_with_combine(lib_path, mem, i_ctx_p,
+ fname, flen, buffer, blen, pclen, pfile,
+ iodev, starting_arg_file, fmode);
+ if (code <= 0) /* +ve means continue searching */
+ return code;
+ }
+ } else {
+ if (search_with_combine) {
+ code = lib_file_open_search_with_combine(lib_path, mem, i_ctx_p,
+ fname, flen, buffer, blen, pclen, pfile,
+ iodev, starting_arg_file, fmode);
+ if (code <= 0) /* +ve means continue searching */
+ return code;
+ }
+ if (search_with_no_combine) {
+ code = lib_file_open_search_with_no_combine(lib_path, mem, i_ctx_p,
+ fname, flen, buffer, blen, pclen, pfile,
+ iodev, starting_arg_file, fmode);
+ if (code <= 0) /* +ve means continue searching */
+ return code;
+ }
}
return_error(e_undefinedfilename);
}
diff -up ghostscript-8.71/Resource/Init/gs_fonts.ps.SEARCH_HERE_FIRST ghostscript-8.71/Resource/Init/gs_fonts.ps
--- ghostscript-8.71/Resource/Init/gs_fonts.ps.SEARCH_HERE_FIRST 2008-08-08 05:22:38.000000000 +0100
+++ ghostscript-8.71/Resource/Init/gs_fonts.ps 2010-08-26 14:42:24.606840016 +0100
@@ -939,7 +939,7 @@ $error /SubstituteFont { } put
if
}
{ % Font file name
- .loadfontloop { true exit } if
+ //true .loadfontloop { //true exit } if
}
ifelse
}
@@ -982,39 +982,47 @@ $error /SubstituteFont { } put
/.genericrfn where {
pop
pop dup .fonttempstring /FontResourceDir getsystemparam .genericrfn
- .loadfontloop {
+ //false .loadfontloop {
//true
} {
- dup .nametostring .loadfontloop
+ dup .nametostring
+ //true .loadfontloop
} ifelse
} {
- .loadfontloop
+ //true .loadfontloop
} ifelse
} bind def
-/.loadfontloop { % <fontname> <filename> .loadfontloop
+/.loadfontloop { % <fontname> <filename> <libflag> .loadfontloop
% <font> true
% -or-
% <fontname> false
% See above regarding the use of 'loop'.
{ % Is the font name a string?
- dup type /stringtype ne
- { QUIET not
+ 1 index type /stringtype ne
+ { pop
+ QUIET not
{ (Can't find font with non-string name: ) print dup =only (.) = flush
}
- if pop false exit
- }
- if
- % Can we open the file?
- findlibfile not
- { QUIET not
+ if pop //false exit
+ } if
+
+ % check <libflag>
+ {
+ findlibfile not
+ } {
+ dup (r) { file } stopped {
+ pop pop //true
+ } {
+ //false
+ } ifelse
+ } ifelse {
+ QUIET not
{ (Can't find \(or can't open\) font file ) print dup print
(.) = flush
}
if pop false exit
- }
- if
-
- % Stack: fontname fontfilename fontfile
+ } if
+ % Stack: fontname fontfilename fontfile
DISKFONTS
{ .currentglobal true .setglobal
2 index (r) file
diff -up ghostscript-8.71/Resource/Init/gs_res.ps.SEARCH_HERE_FIRST ghostscript-8.71/Resource/Init/gs_res.ps
--- ghostscript-8.71/Resource/Init/gs_res.ps.SEARCH_HERE_FIRST 2010-01-31 20:30:13.000000000 +0000
+++ ghostscript-8.71/Resource/Init/gs_res.ps 2010-08-26 14:43:57.159839992 +0100
@@ -287,7 +287,8 @@ systemdict begin
} {
(Resource) search {
exch concatstrings
- exch 0 1 getinterval concatstrings exit
+ exch pop
+ .file_name_separator concatstrings exit
} {
pop
} ifelse
@@ -557,46 +558,29 @@ status {
{ forall } 0 get
currentdict end 2 .execn begin
} bind
-/.file_name_is_iodevice_or_absolute
-{ {
- dup length 0 gt {
- dup 0 get (%) 0 get eq {
- pop true exit
- } if
- } if
- .file_name_is_absolute exit
- } loop
-} bind def
-/ResourceFileName
- { % /in (scr)
- exch //.rfnstring cvs % (scr) (n)
- /GenericResourcePathSep getsystemparam exch % (scr) (/) (n)
- Category .namestring % (scr) (/) (n) (c)
- 3 1 roll % (scr) (c) (/) (n)
- concatstrings concatstrings % (scr) (c/n)
- /GenericResourceDir getsystemparam //.file_name_is_iodevice_or_absolute exec not {
- /GenericResourceDir getsystemparam exch concatstrings
- findlibfile
- { % (scr) (p/c/n) file
- pop exch copy true % (p/c/n) true
- } { % (scr) (c/n)
- false % (scr) (c/n) false
- } ifelse
- } { % (scr) (c/n)
- false % (scr) (c/n) false
- } ifelse
- not { % (scr) (c/n)
- /GenericResourceDir getsystemparam % (scr) (c/n) (d/)
- dup length exch % (scr) (c/n) Ld (d/)
- 3 index copy pop % (scr') (c/n) Ld
- 1 index length % (scr') (c/n) Ld Lcn
- 3 index 3 copy pop % (scr') (c/n) Ld Lcn (scr') Ld Lcn
- getinterval % (scr') (c/n) Ld Lcn (scr[Ld:Lcn])
- 4 3 roll exch % (scr') Ld Lcn (c/n) (scr[Ld:Lcn])
- copy pop % (scr'') Ld Lcn
- add 0 exch getinterval % (scr''[0:Ld+Lcn])
- } if
- } bind
+
+/ResourceFileName { % /in (scr) --> (p/c/n)
+ exch //.rfnstring cvs % (scr) (n)
+ /GenericResourcePathSep getsystemparam exch % (scr) (/) (n)
+ Category .namestring % (scr) (/) (n) (c)
+ 3 1 roll % (scr) (c) (/) (n)
+ concatstrings concatstrings % (scr) (c/n)
+ /GenericResourceDir getsystemparam 1 index % (scr) (c/n) (p/) (c/n)
+ concatstrings % (scr) (c/n) (p/c/n)
+ dup status {
+ pop pop pop pop exch pop % (scr) (p/c/n)
+ } {
+ exch % (scr) (p/c/n) (c/n)
+ .libfile {
+ dup .filename pop % (scr) (p/c/n) file (p/c/n')
+ exch closefile % (scr) (p/c/n) (p/c/n')
+ exch pop % (scr) (p/c/n')
+ } {
+ pop % (scr) (p/c/n)
+ } ifelse
+ } ifelse
+ exch copy % (p/c/n)
+} bind
% Additional entries
diff -up ghostscript-8.71/toolbin/msvcxml.bat.SEARCH_HERE_FIRST ghostscript-8.71/toolbin/msvcxml.bat
--- ghostscript-8.71/toolbin/msvcxml.bat.SEARCH_HERE_FIRST 2009-01-26 17:16:47.000000000 +0000
+++ ghostscript-8.71/toolbin/msvcxml.bat 2010-08-26 14:42:24.619840359 +0100
@@ -1428,7 +1428,7 @@ echo ^<UserMacro Name="GS_DOCDIR" Valu
echo ^<UserMacro Name="GS_INIT" Value="gs_init.ps" /^>
echo ^<UserMacro Name="GS_LIB_DEFAULT" Value="$(GSROOTDIR)/lib;$(GSROOTDIR)/Resource/Font;$(AROOTDIR)/fonts" /^>
echo ^<UserMacro Name="GS_REVISION" Value="$(GS_VERSION)" /^>
-echo ^<UserMacro Name="SEARCH_HERE_FIRST" Value="1" /^>
+echo ^<UserMacro Name="SEARCH_HERE_FIRST" Value="0" /^>
echo ^</VisualStudioPropertySheet^>
goto end

View File

@ -1,12 +0,0 @@
diff -up ghostscript-8.71/base/gdevbbox.c.bbox-close ghostscript-8.71/base/gdevbbox.c
--- ghostscript-8.71/base/gdevbbox.c.bbox-close 2010-01-19 15:48:57.000000000 +0000
+++ ghostscript-8.71/base/gdevbbox.c 2010-09-02 13:03:37.742943978 +0100
@@ -249,7 +249,7 @@ bbox_close_device(gx_device * dev)
* This device was created as a wrapper for a compositor.
* Just free the devices.
*/
- int code = (bdev->forward_open_close ? gs_closedevice(tdev) : 0);
+ int code = (tdev && bdev->forward_open_close ? gs_closedevice(tdev) : 0);
gs_free_object(dev->memory, dev, "bbox_close_device(composite)");
return code;

View File

@ -1,78 +0,0 @@
diff -up ghostscript-8.71/cups/gdevcups.c.cups-realloc-color-depth ghostscript-8.71/cups/gdevcups.c
--- ghostscript-8.71/cups/gdevcups.c.cups-realloc-color-depth 2010-03-15 14:38:08.155372454 +0000
+++ ghostscript-8.71/cups/gdevcups.c 2010-03-15 14:38:12.208372310 +0000
@@ -975,7 +975,8 @@ cups_map_cmyk(gx_device *pdev, /* I - D
frac k, /* I - Black value */
frac *out) /* O - Device colors */
{
- int c0, c1, c2, c3; /* Temporary color values */
+ int c0 = 0, c1 = 0,
+ c2 = 0, c3 = 0; /* Temporary color values */
float rr, rg, rb, /* Real RGB colors */
ciex, ciey, ciez, /* CIE XYZ colors */
ciey_yn, /* Normalized luminance */
@@ -2703,9 +2704,13 @@ cups_put_params(gx_device *pdev, /*
int color_set; /* Were the color attrs set? */
gdev_prn_space_params sp; /* Space parameter data */
int width, /* New width of page */
- height; /* New height of page */
+ height, /* New height of page */
+ colorspace, /* New color space */
+ bitspercolor; /* New bits per color */
static int width_old = 0, /* Previous width */
- height_old = 0; /* Previous height */
+ height_old = 0, /* Previous height */
+ colorspace_old = 0,/* Previous color space */
+ bitspercolor_old = 0;/* Previous bits per color */
ppd_attr_t *backside = NULL,
*backsiderequiresflippedmargins = NULL;
float swap;
@@ -2800,9 +2805,10 @@ cups_put_params(gx_device *pdev, /*
else if (code == 0) \
{ \
dprintf1("DEBUG: Setting %s to", sname); \
- for (i = 0; i < count; i ++) \
- dprintf1(" %d", (unsigned)(arrayval.data[i])); \
- cups->header.name[i] = (unsigned)arrayval.data[i]; \
+ for (i = 0; i < count; i ++) { \
+ dprintf1(" %d", (unsigned)(arrayval.data[i])); \
+ cups->header.name[i] = (unsigned)(arrayval.data[i]); \
+ } \
dprintf("...\n"); \
}
@@ -3243,23 +3249,31 @@ cups_put_params(gx_device *pdev, /*
}
#endif /* CUPS_RASTER_SYNCv1 */
+ colorspace = cups->header.cupsColorSpace;
+ bitspercolor = cups->header.cupsBitsPerColor;
+
/*
* Don't reallocate memory unless the device has been opened...
* Also reallocate only if the size has actually changed...
*/
- if (pdev->is_open && (width != width_old || height != height_old))
+ if (pdev->is_open &&
+ (width != width_old || height != height_old ||
+ colorspace != colorspace_old || bitspercolor != bitspercolor_old))
{
width_old = width;
height_old = height;
+ colorspace_old = colorspace;
+ bitspercolor_old = bitspercolor;
/*
* Device is open and size has changed, so reallocate...
*/
- dprintf4("DEBUG2: Reallocating memory, [%.0f %.0f] = %dx%d pixels...\n",
- pdev->MediaSize[0], pdev->MediaSize[1], width, height);
+ dprintf6("DEBUG2: Reallocating memory, [%.0f %.0f] = %dx%d pixels, color space: %d, bits per color: %d...\n",
+ pdev->MediaSize[0], pdev->MediaSize[1], width, height,
+ colorspace, bitspercolor);
sp = ((gx_device_printer *)pdev)->space_params;

View File

@ -1,50 +0,0 @@
diff -up ghostscript-8.71/base/seexec.c.epstopdf-failure ghostscript-8.71/base/seexec.c
--- ghostscript-8.71/base/seexec.c.epstopdf-failure 2009-08-14 05:12:58.000000000 +0100
+++ ghostscript-8.71/base/seexec.c 2010-08-26 14:53:05.662840885 +0100
@@ -165,7 +165,11 @@ hp: r = *pr;
r.limit = r.ptr + ss->hex_left;
status = s_hex_process(&r, pw, &ss->odd,
(ss->is_leading_space ? hex_ignore_leading_whitespace : hex_break_on_whitespace));
- ss->is_leading_space = (status == 2);
+ if (status == 2) {
+ ss->is_leading_space = true;
+ status = 1;
+ } else
+ ss->is_leading_space = false;
pr->ptr = r.ptr;
ss->hex_left -= r.ptr - start;
/*
diff -up ghostscript-8.71/base/sstring.c.epstopdf-failure ghostscript-8.71/base/sstring.c
--- ghostscript-8.71/base/sstring.c.epstopdf-failure 2009-08-13 20:04:34.000000000 +0100
+++ ghostscript-8.71/base/sstring.c 2010-08-26 14:53:05.663840592 +0100
@@ -355,8 +355,12 @@ const stream_template s_PSSD_template =
/* ------ Utilities ------ */
/*
- * Convert hex data to binary. Return 1 if we filled the string, 0 if
- * we ran out of input data before filling the string, or ERRC on error.
+ * Convert hex data to binary.
+ * Return 1 if we filled the string,
+ * 0 if we ran out of input data before filling the string,
+ * 2 if hex_break_on_whitespace is on and we encounrered
+ * a white space.
+ * ERRC on error.
* The caller must set *odd_digit to -1 before the first call;
* after each call, if an odd number of hex digits has been read (total),
* *odd_digit is the odd digit value, otherwise *odd_digit = -1.
diff -up ghostscript-8.71/psi/iscan.c.epstopdf-failure ghostscript-8.71/psi/iscan.c
--- ghostscript-8.71/psi/iscan.c.epstopdf-failure 2009-11-11 13:52:23.000000000 +0000
+++ ghostscript-8.71/psi/iscan.c 2010-08-26 14:53:05.665840572 +0100
@@ -329,9 +329,9 @@ scan_handle_refill(i_ctx_t *i_ctx_p, sca
rstate, 1, cont);
}
}
- /* No more data available, but no exception. How can this be? */
- lprintf("Can't refill scanner input buffer!");
- return_error(e_Fatal);
+ /* No more data available, but no exception. */
+ /* A filter is consuming headers but returns nothing. */
+ return 0;
}
/*

View File

@ -1,33 +0,0 @@
diff -up ghostscript-8.64/base/devs.mak.fPIC ghostscript-8.64/base/devs.mak
--- ghostscript-8.64/base/devs.mak.fPIC 2008-11-07 18:49:34.000000000 +0000
+++ ghostscript-8.64/base/devs.mak 2009-02-04 11:34:21.000000000 +0000
@@ -456,7 +456,7 @@ $(GLOBJ)gdevx.$(OBJ) : $(GLSRC)gdevx.c $
$(GLCCSHARED) $(XINCLUDE) $(GLO_)gdevx.$(OBJ) $(C_) $(GLSRC)gdevx.c
$(GLOBJ)gdevxcmp.$(OBJ) : $(GLSRC)gdevxcmp.c $(GDEVX) $(math__h)
- $(GLCC) $(XINCLUDE) $(GLO_)gdevxcmp.$(OBJ) $(C_) $(GLSRC)gdevxcmp.c
+ $(GLCCSHARED) $(XINCLUDE) $(GLO_)gdevxcmp.$(OBJ) $(C_) $(GLSRC)gdevxcmp.c
$(GLOBJ)gdevxini.$(OBJ) : $(GLSRC)gdevxini.c $(GDEVX) $(memory__h)\
$(gserrors_h) $(gsparamx_h) $(gxdevmem_h) $(gdevbbox_h)
diff -up ghostscript-8.64/base/lib.mak.fPIC ghostscript-8.64/base/lib.mak
--- ghostscript-8.64/base/lib.mak.fPIC 2009-01-08 09:17:18.000000000 +0000
+++ ghostscript-8.64/base/lib.mak 2009-02-04 11:34:21.000000000 +0000
@@ -894,7 +894,7 @@ $(GLOBJ)gsparam.$(OBJ) : $(GLSRC)gsparam
$(GLOBJ)gsparamx.$(OBJ) : $(GLSRC)gsparamx.c $(string__h)\
$(gserror_h) $(gserrors_h) $(gsmemory_h) $(gsparam_h) $(gsparamx_h)\
$(gstypes_h)
- $(GLCC) $(GLO_)gsparamx.$(OBJ) $(C_) $(GLSRC)gsparamx.c
+ $(GLCCSHARED) $(GLO_)gsparamx.$(OBJ) $(C_) $(GLSRC)gsparamx.c
# Future replacement for gsparams.c
$(GLOBJ)gsparam2.$(OBJ) : $(GLSRC)gsparam2.c $(GXERR) $(memory__h)\
@@ -1085,7 +1085,7 @@ $(GLOBJ)gdevnfwd.$(OBJ) : $(GLSRC)gdevnf
# Provide a mapping between StandardEncoding and ISOLatin1Encoding.
$(GLOBJ)gdevemap.$(OBJ) : $(GLSRC)gdevemap.c $(AK) $(std_h)
- $(GLCC) $(GLO_)gdevemap.$(OBJ) $(C_) $(GLSRC)gdevemap.c
+ $(GLCCSHARED) $(GLO_)gdevemap.$(OBJ) $(C_) $(GLSRC)gdevemap.c
###### Create a pseudo-"feature" for the entire graphics library.

View File

@ -1,31 +0,0 @@
diff -up ghostscript-8.71/cups/gdevcups.c.gdevcups-ripcache ghostscript-8.71/cups/gdevcups.c
--- ghostscript-8.71/cups/gdevcups.c.gdevcups-ripcache 2010-09-02 14:38:53.886818591 +0100
+++ ghostscript-8.71/cups/gdevcups.c 2010-09-02 14:40:49.925943426 +0100
@@ -915,8 +915,7 @@ cups_get_space_params(const gx_device_pr
switch (sscanf(cache_env, "%f%254s", &cache_size, cache_units))
{
case 0 :
- cache_size = 8 * 1024 * 1024;
- break;
+ return;
case 1 :
cache_size *= 4 * CUPS_TILE_SIZE * CUPS_TILE_SIZE;
break;
@@ -933,12 +932,15 @@ cups_get_space_params(const gx_device_pr
}
}
else
- cache_size = 8 * 1024 * 1024;
+ return;
+
+ if (cache_size == 0)
+ return;
dprintf1("DEBUG2: cache_size = %.0f\n", cache_size);
space_params->MaxBitmap = (int)cache_size;
- space_params->BufferSpace = (int)cache_size / 10;
+ space_params->BufferSpace = (int)cache_size;
}

View File

@ -0,0 +1,37 @@
diff -up ghostscript-9.00/psi/zusparam.c.iccprofiles-initdir ghostscript-9.00/psi/zusparam.c
--- ghostscript-9.00/psi/zusparam.c.iccprofiles-initdir 2010-09-23 14:15:24.628921593 +0100
+++ ghostscript-9.00/psi/zusparam.c 2010-09-23 14:29:21.189796748 +0100
@@ -593,14 +593,31 @@ set_default_gray_icc(i_ctx_t *i_ctx_p, g
return(code);
}
+extern_gx_io_device_table();
+
static void
current_icc_directory(i_ctx_t *i_ctx_p, gs_param_string * pval)
{
static const char *const rfs = "%rom%iccprofiles/"; /* as good as any other */
const gs_imager_state * pis = (gs_imager_state *) igs;
+ int have_rom_device = 0;
+
+ if (pis->icc_manager->profiledir != NULL)
+ pval->data = (const byte *) pis->icc_manager->profiledir;
+ else {
+ int i;
+ for (i = 0; i < gx_io_device_table_count; i++) {
+ const gx_io_device *iodev = gx_io_device_table[i];
+ const char *dname = iodev->dname;
+
+ if (dname && strlen(dname) == 5 && !memcmp("%rom%", dname, 5)) {
+ have_rom_device = 1;
+ break;
+ }
+ }
- pval->data = (const byte *)( (pis->icc_manager->profiledir == NULL) ?
- rfs : pis->icc_manager->profiledir);
+ pval->data = (const byte *) (have_rom_device ? rfs : "");
+ }
pval->size = strlen((const char *)pval->data);
pval->persistent = true;
}

View File

@ -1,90 +0,0 @@
diff -up ghostscript-8.71/psi/iname.c.iname-segfault ghostscript-8.71/psi/iname.c
--- ghostscript-8.71/psi/iname.c.iname-segfault 2008-10-21 17:26:09.000000000 +0100
+++ ghostscript-8.71/psi/iname.c 2010-09-02 12:13:02.833819490 +0100
@@ -47,8 +47,8 @@ gs_private_st_composite(st_name_table, n
/* Forward references */
static int name_alloc_sub(name_table *);
-static void name_free_sub(name_table *, uint);
-static void name_scan_sub(name_table *, uint, bool);
+static void name_free_sub(name_table *, uint, bool);
+static void name_scan_sub(name_table *, uint, bool, bool);
/* Debugging printout */
#ifdef DEBUG
@@ -99,7 +99,7 @@ names_init(ulong count, gs_ref_memory_t
if (code < 0) {
while (nt->sub_next > 0)
- name_free_sub(nt, --(nt->sub_next));
+ name_free_sub(nt, --(nt->sub_next), false);
gs_free_object(mem, nt, "name_init(nt)");
return 0;
}
@@ -413,16 +413,7 @@ names_trace_finish(name_table * nt, gc_s
if (sub != 0) {
int save_count = nt->sub_count;
- name_scan_sub(nt, i, true);
- if (save_count != nt->sub_count) {
- /* name_scan_sub has released the i-th entry. */
- continue;
- }
- if (nt->sub[i].names == 0 && gcst != 0) {
- /* Mark the just-freed sub-table as unmarked. */
- o_set_unmarked((obj_header_t *)sub - 1);
- o_set_unmarked((obj_header_t *)ssub - 1);
- }
+ name_scan_sub(nt, i, true, true && (gcst != 0));
}
}
nt->sub_next = 0;
@@ -506,7 +497,7 @@ name_alloc_sub(name_table * nt)
/* Add the newly allocated entries to the free list. */
/* Note that the free list will only be properly sorted if */
/* it was empty initially. */
- name_scan_sub(nt, sub_index, false);
+ name_scan_sub(nt, sub_index, false, false);
#ifdef DEBUG
if (gs_debug_c('n')) { /* Print the lengths of the hash chains. */
int i0;
@@ -535,8 +526,20 @@ name_alloc_sub(name_table * nt)
/* Free a sub-table. */
static void
-name_free_sub(name_table * nt, uint sub_index)
+name_free_sub(name_table * nt, uint sub_index, bool unmark)
{
+ /* If the subtable is in a previous save level, gs_free_object()
+ * may not actually free the memory, in case that happens, we need
+ * to explicitly remove the gc mark.
+ */
+ if (unmark) {
+ name_sub_table *sub = nt->sub[sub_index].names;
+ name_string_sub_table_t *ssub = nt->sub[sub_index].strings;
+
+ o_set_unmarked((obj_header_t *)sub - 1);
+ o_set_unmarked((obj_header_t *)ssub - 1);
+ }
+
gs_free_object(nt->memory, nt->sub[sub_index].strings,
"name_free_sub(string sub-table)");
gs_free_object(nt->memory, nt->sub[sub_index].names,
@@ -550,7 +553,7 @@ name_free_sub(name_table * nt, uint sub_
/* will stay sorted. If all entries are unmarked and free_empty is true, */
/* free the sub-table. */
static void
-name_scan_sub(name_table * nt, uint sub_index, bool free_empty)
+name_scan_sub(name_table * nt, uint sub_index, bool free_empty, bool unmark)
{
name_string_sub_table_t *ssub = nt->sub[sub_index].strings;
uint free = nt->free;
@@ -579,7 +582,7 @@ name_scan_sub(name_table * nt, uint sub_
nt->free = free;
else {
/* No marked entries, free the sub-table. */
- name_free_sub(nt, sub_index);
+ name_free_sub(nt, sub_index, unmark);
if (sub_index == nt->sub_count - 1) {
/* Back up over a final run of deleted sub-tables. */
do {

View File

@ -1,24 +0,0 @@
--- ghostscript-8.71/base/unix-dll.mak 2009-10-19 21:24:53.000000000 +0100
+++ ghostscript-8.71/base/unix-dll.mak.ldflags 2010-02-19 10:07:06.645044318 +0000
@@ -88,8 +88,9 @@ $(GSSOX_XE): $(GS_SO) $(PSSRC)$(SOC_LOAD
# ------------------------- Recursive make targets ------------------------- #
-SODEFS=LDFLAGS='$(LDFLAGS) $(LDFLAGS_SO)'\
+SODEFS=\
GS_XE=$(BINDIR)/$(SOBINRELDIR)/$(GS_SONAME_MAJOR_MINOR)\
+ GS_XE_LDFLAGS='$(LDFLAGS_SO)'\
STDIO_IMPLEMENTATION=c\
DISPLAY_DEV=$(DD)$(SOOBJRELDIR)/display.dev\
BINDIR=$(BINDIR)/$(SOBINRELDIR)\
--- ghostscript-8.71/base/unixlink.mak 2008-02-29 08:13:08.000000000 +0000
+++ ghostscript-8.71/base/unixlink.mak.ldflags 2010-02-19 10:07:06.646044276 +0000
@@ -50,7 +50,7 @@ $(GS_A): $(obj_tr) $(ECHOGS_XE) $(INT_AR
# which has limited environment space.
ldt_tr=$(PSOBJ)ldt.tr
$(GS_XE): $(ld_tr) $(ECHOGS_XE) $(XE_ALL) $(PSOBJ)gsromfs$(COMPILE_INITS).$(OBJ)
- $(ECHOGS_XE) -w $(ldt_tr) -n - $(CCLD) $(LDFLAGS) -o $(GS_XE)
+ $(ECHOGS_XE) -w $(ldt_tr) -n - $(CCLD) $(GS_XE_LDFLAGS) $(LDFLAGS) -o $(GS_XE)
$(ECHOGS_XE) -a $(ldt_tr) -n -s $(PSOBJ)gsromfs$(COMPILE_INITS).$(OBJ) $(PSOBJ)gs.$(OBJ) -s
cat $(ld_tr) >>$(ldt_tr)
$(ECHOGS_XE) -a $(ldt_tr) -s - $(EXTRALIBS) $(STDLIBS)

View File

@ -1,12 +0,0 @@
diff -up ghostscript-8.71/lib/pdf2dsc.ps.pdf2dsc ghostscript-8.71/lib/pdf2dsc.ps
--- ghostscript-8.71/lib/pdf2dsc.ps.pdf2dsc 2010-02-20 15:50:51.287734970 +0000
+++ ghostscript-8.71/lib/pdf2dsc.ps 2010-02-20 15:51:02.902609964 +0000
@@ -116,7 +116,7 @@ systemdict /.setsafe known { .setsafe }
DSCfile PDFname write==only
( \(r\) file { DELAYSAFER { .setsafe } if } stopped pop\n) puts
( pdfopen begin\n) puts
- ( copy_trailer_attrs\n) puts
+ ( process_trailer_attrs\n) puts
(%%EndSetup\n) puts
/.hasPageLabels false def % see "Page Labels" in the PDF Reference

View File

@ -1,39 +0,0 @@
diff -up ghostscript-8.70/cups/pdftoraster.c.pdftoraster-exit ghostscript-8.70/cups/pdftoraster.c
--- ghostscript-8.70/cups/pdftoraster.c.pdftoraster-exit 2008-10-17 23:58:21.000000000 +0100
+++ ghostscript-8.70/cups/pdftoraster.c 2010-01-25 10:15:42.269209639 +0000
@@ -35,6 +35,8 @@ MIT Open Source License - http://www.o
#include <stdarg.h>
#include <fcntl.h>
#include <cups/raster.h>
+#include <sys/types.h>
+#include <sys/wait.h>
#define MAX_CHECK_COMMENT_LINES 20
#ifndef GS
@@ -123,6 +125,7 @@ int main(int argc, char *argv[], char *e
const char* apos;
int fds[2];
int pid;
+ int status;
parseOpts(argc, argv);
@@ -502,8 +505,17 @@ int main(int argc, char *argv[], char *e
}
}
fclose(fp);
+ close (fds[1]);
}
- exit(0);
+ if (waitpid (pid, &status, 0) == -1) {
+ perror (GS);
+ exit (1);
+ }
+
+ if (WIFEXITED (status))
+ exit(WEXITSTATUS (status));
+ else
+ exit(1);
}

View File

@ -1,15 +1,15 @@
diff -up ghostscript-8.64/lib/dvipdf.scripts ghostscript-8.64/lib/dvipdf
--- ghostscript-8.64/lib/dvipdf.scripts 2009-01-10 22:11:18.000000000 +0000
+++ ghostscript-8.64/lib/dvipdf 2009-02-04 11:32:31.000000000 +0000
diff -up ghostscript-9.00/lib/dvipdf.scripts ghostscript-9.00/lib/dvipdf
--- ghostscript-9.00/lib/dvipdf.scripts 2010-06-03 01:32:07.000000000 +0100
+++ ghostscript-9.00/lib/dvipdf 2010-09-23 09:56:35.592796899 +0100
@@ -44,4 +44,4 @@ fi
# We have to include the options twice because -I only takes effect if it
# appears before other options.
-exec dvips -Ppdf $DVIPSOPTIONS -q -f "$infile" | $GS_EXECUTABLE $OPTIONS -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sstdout=%stderr -sOutputFile="$outfile" $OPTIONS -c .setpdfwrite -
+exec dvips -R -Ppdf $DVIPSOPTIONS -q -f "$infile" | $GS_EXECUTABLE $OPTIONS -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sstdout=%stderr -sOutputFile="$outfile" $OPTIONS -c .setpdfwrite -
diff -up ghostscript-8.64/lib/pv.sh.scripts ghostscript-8.64/lib/pv.sh
--- ghostscript-8.64/lib/pv.sh.scripts 2007-07-05 11:41:52.000000000 +0100
+++ ghostscript-8.64/lib/pv.sh 2009-02-04 11:31:32.000000000 +0000
-exec dvips -Ppdf $DVIPSOPTIONS -q -f "$infile" | $GS_EXECUTABLE $OPTIONS -q -P- -dSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sstdout=%stderr -sOutputFile="$outfile" $OPTIONS -c .setpdfwrite -
+exec dvips -R -Ppdf $DVIPSOPTIONS -q -f "$infile" | $GS_EXECUTABLE $OPTIONS -q -P- -dSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sstdout=%stderr -sOutputFile="$outfile" $OPTIONS -c .setpdfwrite -
diff -up ghostscript-9.00/lib/pv.sh.scripts ghostscript-9.00/lib/pv.sh
--- ghostscript-9.00/lib/pv.sh.scripts 2010-06-03 01:32:07.000000000 +0100
+++ ghostscript-9.00/lib/pv.sh 2010-09-23 09:56:59.512796516 +0100
@@ -31,7 +31,7 @@ fi
GS_EXECUTABLE=gs
@ -27,5 +27,5 @@ diff -up ghostscript-8.64/lib/pv.sh.scripts ghostscript-8.64/lib/pv.sh
-dvips -p $PAGE -n 1 "$FILE" "$@" -o $tmpfile
+#dvips -R -D$RESOLUTION -p $PAGE -n 1 "$FILE" "$@" -o $tmpfile
+dvips -R -p $PAGE -n 1 "$FILE" "$@" -o $tmpfile
$GS_EXECUTABLE $tmpfile
$GS_EXECUTABLE -P- -dSAFER $tmpfile
exit 0

View File

@ -1,9 +1,9 @@
diff -up ghostscript-8.64/base/sjpx.c.system-jasper ghostscript-8.64/base/sjpx.c
--- ghostscript-8.64/base/sjpx.c.system-jasper 2008-08-21 00:22:49.000000000 +0100
+++ ghostscript-8.64/base/sjpx.c 2009-02-04 11:35:56.000000000 +0000
@@ -34,14 +34,6 @@ static void s_jpxd_set_defaults(stream_s
diff -up ghostscript-9.00/base/sjpx.c.system-jasper ghostscript-9.00/base/sjpx.c
--- ghostscript-9.00/base/sjpx.c.system-jasper 2010-08-17 15:31:58.000000000 +0100
+++ ghostscript-9.00/base/sjpx.c 2010-09-23 09:59:46.747467642 +0100
@@ -33,14 +33,6 @@ static void s_jpxd_set_defaults(stream_s
private_st_jpxd_state(); /* creates a gc object for our state,
defined in sjpx.h */
defined in sjpx.h */
-/* error reporting callback for the jpx library */
-static void
@ -16,7 +16,7 @@ diff -up ghostscript-8.64/base/sjpx.c.system-jasper ghostscript-8.64/base/sjpx.c
/* initialize the steam.
this involves allocating the stream and image structures, and
initializing the decoder.
@@ -59,7 +51,6 @@ s_jpxd_init(stream_state * ss)
@@ -56,7 +48,6 @@ s_jpxd_init(stream_state * ss)
}
status = jas_init();

View File

@ -1,13 +0,0 @@
diff -up ghostscript-8.71/base/gdevtfax.c.tif-fail-close ghostscript-8.71/base/gdevtfax.c
--- ghostscript-8.71/base/gdevtfax.c.tif-fail-close 2010-03-12 10:57:43.514750465 +0000
+++ ghostscript-8.71/base/gdevtfax.c 2010-03-12 10:58:38.253627230 +0000
@@ -97,7 +97,8 @@ tfax_close(gx_device * pdev)
{
gx_device_tfax *const tfdev = (gx_device_tfax *)pdev;
- TIFFCleanup(tfdev->tif);
+ if (tfdev->tif)
+ TIFFCleanup(tfdev->tif);
return gdev_prn_close(pdev);
}

View File

@ -1,12 +0,0 @@
diff -up ghostscript-8.71/base/gdevtifs.h.tiff-default-strip-size ghostscript-8.71/base/gdevtifs.h
--- ghostscript-8.71/base/gdevtifs.h.tiff-default-strip-size 2010-02-04 17:47:57.000000000 +0000
+++ ghostscript-8.71/base/gdevtifs.h 2010-03-16 09:58:29.269600052 +0000
@@ -50,7 +50,7 @@ int tiff_print_page(gx_device_printer *d
* Sets the compression tag for TIFF and updates the rows_per_strip tag to
* reflect max_strip_size under the new compression scheme.
*/
-#define TIFF_DEFAULT_STRIP_SIZE 8192
+#define TIFF_DEFAULT_STRIP_SIZE 1048576
int tiff_set_compression(gx_device_printer *pdev,
TIFF *tif,

View File

@ -1,59 +0,0 @@
diff -up ghostscript-8.71/base/gdevtfnx.c.tiff-fixes ghostscript-8.71/base/gdevtfnx.c
--- ghostscript-8.71/base/gdevtfnx.c.tiff-fixes 2010-02-04 17:47:57.000000000 +0000
+++ ghostscript-8.71/base/gdevtfnx.c 2010-03-16 10:04:00.686600827 +0000
@@ -105,6 +105,8 @@ tiff12_print_page(gx_device_printer * pd
TIFFSetField(tfdev->tif, TIFFTAG_BITSPERSAMPLE, 4);
tiff_set_rgb_fields(tfdev);
+ TIFFCheckpointDirectory(tfdev->tif);
+
/* Write the page data. */
{
int y;
diff -up ghostscript-8.71/base/gdevtifs.c.tiff-fixes ghostscript-8.71/base/gdevtifs.c
--- ghostscript-8.71/base/gdevtifs.c.tiff-fixes 2010-02-04 17:47:57.000000000 +0000
+++ ghostscript-8.71/base/gdevtifs.c 2010-03-16 10:04:00.689600292 +0000
@@ -243,8 +243,8 @@ int tiff_set_fields_for_printer(gx_devic
TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH);
- TIFFSetField(tif, TIFFTAG_XRESOLUTION, pdev->x_pixels_per_inch);
- TIFFSetField(tif, TIFFTAG_YRESOLUTION, pdev->y_pixels_per_inch);
+ TIFFSetField(tif, TIFFTAG_XRESOLUTION, (float)pdev->x_pixels_per_inch);
+ TIFFSetField(tif, TIFFTAG_YRESOLUTION, (float)pdev->y_pixels_per_inch);
{
char revs[10];
@@ -293,6 +293,8 @@ tiff_print_page(gx_device_printer *dev,
if (data == NULL)
return_error(gs_error_VMerror);
+ TIFFCheckpointDirectory(tif);
+
memset(data, 0, max_size);
for (row = 0; row < dev->height; row++) {
code = gdev_prn_copy_scan_lines(dev, row, data, size);
diff -up ghostscript-8.71/base/gdevtsep.c.tiff-fixes ghostscript-8.71/base/gdevtsep.c
--- ghostscript-8.71/base/gdevtsep.c.tiff-fixes 2010-02-04 17:47:57.000000000 +0000
+++ ghostscript-8.71/base/gdevtsep.c 2010-03-16 10:04:00.700601143 +0000
@@ -1438,6 +1438,10 @@ tiffsep_print_page(gx_device_printer * p
return_error(gs_error_VMerror);
}
+ for (comp_num = 0; comp_num < num_comp; comp_num++ )
+ TIFFCheckpointDirectory(tfdev->tiff[comp_num]);
+ TIFFCheckpointDirectory(tfdev->tiff_comp);
+
/* Write the page data. */
for (y = 0; y < pdev->height; ++y) {
code = gdev_prn_get_bits(pdev, y, line, &row);
@@ -1603,6 +1607,9 @@ tiffsep1_print_page(gx_device_printer *
if (line == NULL || unpacked == NULL || dithered_line == NULL)
return_error(gs_error_VMerror);
+ for (comp_num = 0; comp_num < num_comp; comp_num++ )
+ TIFFCheckpointDirectory(tfdev->tiff[comp_num]);
+
/* Loop for the lines */
for (y = 0; y < pdev->height; ++y) {
code = gdev_prn_get_bits(pdev, y, line, &row);

View File

@ -1,7 +1,7 @@
diff -up ghostscript-8.71/base/gsmisc.c.vsnprintf ghostscript-8.71/base/gsmisc.c
--- ghostscript-8.71/base/gsmisc.c.vsnprintf 2010-01-05 00:52:07.000000000 +0000
+++ ghostscript-8.71/base/gsmisc.c 2010-02-17 11:30:13.777615156 +0000
@@ -235,7 +235,7 @@ int gs_throw_imp(const char *func, const
diff -up ghostscript-9.00/base/gsmisc.c.vsnprintf ghostscript-9.00/base/gsmisc.c
--- ghostscript-9.00/base/gsmisc.c.vsnprintf 2010-05-06 17:04:27.000000000 +0100
+++ ghostscript-9.00/base/gsmisc.c 2010-09-23 10:01:48.152921502 +0100
@@ -260,7 +260,7 @@ int gs_throw_imp(const char *func, const
va_list ap;
va_start(ap, fmt);
@ -10,9 +10,9 @@ diff -up ghostscript-8.71/base/gsmisc.c.vsnprintf ghostscript-8.71/base/gsmisc.c
msg[sizeof(msg) - 1] = 0;
va_end(ap);
diff -up ghostscript-8.71/base/gxttfb.c.vsnprintf ghostscript-8.71/base/gxttfb.c
--- ghostscript-8.71/base/gxttfb.c.vsnprintf 2009-12-06 19:12:08.000000000 +0000
+++ ghostscript-8.71/base/gxttfb.c 2010-02-17 11:30:13.778616076 +0000
diff -up ghostscript-9.00/base/gxttfb.c.vsnprintf ghostscript-9.00/base/gxttfb.c
--- ghostscript-9.00/base/gxttfb.c.vsnprintf 2010-05-05 19:14:21.000000000 +0100
+++ ghostscript-9.00/base/gxttfb.c 2010-09-23 10:51:31.575797285 +0100
@@ -246,7 +246,7 @@ static int DebugPrint(ttfFont *ttf, cons
if (gs_debug_c('Y')) {
@ -21,10 +21,10 @@ diff -up ghostscript-8.71/base/gxttfb.c.vsnprintf ghostscript-8.71/base/gxttfb.c
+ count = vsnprintf(buf, sizeof (buf), fmt, args);
/* NB: moved debug output from stdout to stderr
*/
errwrite(buf, count);
diff -up ghostscript-8.71/base/rinkj/rinkj-byte-stream.c.vsnprintf ghostscript-8.71/base/rinkj/rinkj-byte-stream.c
--- ghostscript-8.71/base/rinkj/rinkj-byte-stream.c.vsnprintf 2008-04-04 02:02:16.000000000 +0100
+++ ghostscript-8.71/base/rinkj/rinkj-byte-stream.c 2010-02-17 11:30:13.791615392 +0000
errwrite(ttf->DebugMem, buf, count);
diff -up ghostscript-9.00/base/rinkj/rinkj-byte-stream.c.vsnprintf ghostscript-9.00/base/rinkj/rinkj-byte-stream.c
--- ghostscript-9.00/base/rinkj/rinkj-byte-stream.c.vsnprintf 2008-04-04 02:02:16.000000000 +0100
+++ ghostscript-9.00/base/rinkj/rinkj-byte-stream.c 2010-09-23 10:01:48.154921184 +0100
@@ -43,7 +43,7 @@ rinkj_byte_stream_printf (RinkjByteStrea
va_list ap;

View File

@ -1,11 +1,11 @@
%define gs_ver 8.71
%define gs_dot_ver 8.71
%define gs_ver 9.00
%define gs_dot_ver 9.00
%{expand: %%define build_with_freetype %{?_with_freetype:1}%{!?_with_freetype:0}}
Summary: A PostScript interpreter and renderer
Name: ghostscript
Version: %{gs_ver}
Release: 16%{?dist}
Release: 1%{?dist}
# Included CMap data is Redistributable, no modification permitted,
# see http://bugzilla.redhat.com/487510
@ -19,30 +19,15 @@ Source4: cidfmap
Patch1: ghostscript-multilib.patch
Patch2: ghostscript-scripts.patch
Patch3: ghostscript-noopt.patch
Patch4: ghostscript-fPIC.patch
Patch5: ghostscript-runlibfileifexists.patch
Patch6: ghostscript-system-jasper.patch
Patch7: ghostscript-pksmraw.patch
Patch8: ghostscript-jbig2dec-nullderef.patch
Patch9: ghostscript-iname-segfault.patch
Patch10: ghostscript-cups-filters.patch
Patch11: ghostscript-CVE-2009-4270.patch
Patch12: ghostscript-vsnprintf.patch
Patch13: ghostscript-pdftoraster-exit.patch
Patch14: ghostscript-ldflags.patch
Patch15: ghostscript-pdf2dsc.patch
Patch16: ghostscript-cups-realloc-color-depth.patch
Patch17: ghostscript-tif-fail-close.patch
Patch18: ghostscript-tiff-default-strip-size.patch
Patch19: ghostscript-tiff-fixes.patch
Patch20: ghostscript-CVE-2010-1628.patch
Patch21: ghostscript-jbig2-image-refcount.patch
Patch22: ghostscript-SEARCH_HERE_FIRST.patch
Patch23: ghostscript--P-.patch
Patch24: ghostscript-epstopdf-failure.patch
Patch25: ghostscript-bbox-close.patch
Patch26: ghostscript-gdevcups-ripcache.patch
Patch27: ghostscript-Fontmap.local.patch
Patch28: ghostscript-iccprofiles-initdir.patch
Requires: urw-fonts >= 1.1, ghostscript-fonts
BuildRequires: xz
@ -126,9 +111,6 @@ rm -rf libpng zlib jpeg jasper
# Build igcref.c with -O0 to work around bug #150771.
%patch3 -p1 -b .noopt
# Fix shared library build.
%patch4 -p1 -b .fPIC
# Define .runlibfileifexists.
%patch5 -p1
@ -141,69 +123,24 @@ rm -rf libpng zlib jpeg jasper
# Applied patch to fix NULL dereference in JBIG2 decoder (bug #501710).
%patch8 -p1 -b .jbig2dec-nullderef
# Applied upstream patch to fix iname.c segfault (bug #465311).
%patch9 -p1 -b .iname-segfault
# Install CUPS filter convs files in the correct place.
%patch10 -p1 -b .cups-filters
# Fix debugging output from gdevcups (bug #540760).
%patch11 -p1 -b .CVE-2009-4270
# Harden ghostscript's debugging output functions (bug #540760).
%patch12 -p1 -b .vsnprintf
# Fixed pdftoraster so that it waits for its sub-process to exit.
%patch13 -p1 -b .pdftoraster-exit
# Fixed LDFLAGS when building dynamically linked executables (bug #565935).
%patch14 -p1 -b .ldflags
# Fixed pdf2dsc.ps (bug #565935).
%patch15 -p1 -b .pdf2dsc
# Reallocate memory in gdevcups when color depth changes (bug #563313).
%patch16 -p1 -b .cups-realloc-color-depth
# Don't segfault closing tiffg3 device if opening failed (bug #571520).
%patch17 -p1 -b .tif-fail-close
# Restore the TIFF default strip size of 0 (bug #571520).
%patch18 -p1 -b .tiff-default-strip-size
# Backported some more TIFF fixes (bug #573970).
%patch19 -p1 -b .tiff-fixes
# Applied patch to fix CVE-2010-1628 (memory corruption at PS stack
# overflow, bug #592492).
%patch20 -p1 -b .CVE-2010-1628
# Avoid another NULL pointer dereference in jbig2 code (bug #621569).
%patch21 -p1 -b .jbig2-image-refcount
# Change SEARCH_HERE_FIRST default to make -P- default instead of -P
# (bug #599564).
%patch22 -p1 -b .SEARCH_HERE_FIRST
# Use -P- and -dSAFER in scripts (bug #599564).
%patch23 -p1 -b .-P-
# Avoid epstopdf failure using upstream patch (bug #627390).
%patch24 -p1 -b .epstopdf-failure
# Applied patch to fix NULL dereference in bbox driver (bug #591624).
%patch25 -p1 -b .bbox-close
# Applied patch to let gdevcups use automatic memory allocation. Use
# RIPCache=auto in /etc/cups/cupsd.conf to enable.
%patch26 -p1 -b .gdevcups-ripcache
# Restored Fontmap.local patch, incorrectly dropped after
# ghostscript-8.15.4-3 (bug #610301).
# Note: don't use -b here to avoid the backup file ending up in the
# package manifest.
%patch27 -p1
# Don't assume %rom% device is available for initial ICC profile dir.
%patch28 -p1 -b .iccprofiles-initdir
# Convert manual pages to UTF-8
from8859_1() {
iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_"
@ -347,6 +284,7 @@ rm -rf $RPM_BUILD_ROOT
%config %{_datadir}/ghostscript/%{gs_dot_ver}/Resource/Init/gs_init.ps
%config %{_datadir}/ghostscript/%{gs_dot_ver}/Resource/Init/Fontmap*
%{_datadir}/ghostscript/%{gs_dot_ver}/lib
%{_datadir}/ghostscript/%{gs_dot_ver}/iccprofiles
%{_mandir}/man*/*
%lang(de) %{_mandir}/de/man*/*
%{_libdir}/libgs.so.*
@ -383,6 +321,13 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/libgs.so
%changelog
* Thu Sep 23 2010 Tim Waugh <twaugh@redhat.com> 9.00-1
- Updated to 9.00. No longer need -P-, CVE-2009-4270, CVE-2010-1628,
SEARCH_HERE_FIRST, bbox-close, cups-realloc-color-depth,
epstopdf-failure, fPIC, gdevcups-ripcache, iname-segfault, ldfalgs,
pdf2dsc, pdftoraster-exit, tif-fail-close, tiff-default-strip-size,
or tiff-fixes patches.
* Mon Sep 13 2010 Tim Waugh <twaugh@redhat.com> 8.71-16
- Pulled in gs_fonts.ps modification for .runlibfileifexists from
OpenSUSE package (bug #610301).

View File

@ -1,3 +1,3 @@
2fbae60417d42779f6488ab897dcaaf6 acro5-cmaps-2001.tar.gz
dfc93dd2aaaf2b86d2fd55f654c13261 adobe-cmaps-200406.tar.gz
5005d68f7395c2bfc4b05c1a60d9b6ba ghostscript-8.71.tar.xz
1ca5f245677f78f573e6490bdb40702f ghostscript-9.00.tar.xz