summaryrefslogtreecommitdiff
path: root/psi/zfile.c
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2015-07-30 17:27:23 +0100
committerChris Liddell <chris.liddell@artifex.com>2015-08-06 10:30:08 +0100
commit1fae53a708fca6c2ac0417bc23f5d095cc379250 (patch)
tree1ae77835a99385e70b009a574f80a47b104e7b89 /psi/zfile.c
parent6fb23cff7abcef91d03b43454d2d40d79c5e83da (diff)
downloadghostpdl-1fae53a708fca6c2ac0417bc23f5d095cc379250.tar.gz
Bug 696101: fix uses of the sfopen API.
The stream API in GS is defined as *always* opening files in binary mode, where applicable, so there is no need for the API clients to specify binary mode. This is previously been benign, and thus ignored, but reportedly ending up with a duplicate 'b' character in the mode causes a crash on Windows 10. No cluster differences.
Diffstat (limited to 'psi/zfile.c')
-rw-r--r--psi/zfile.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/psi/zfile.c b/psi/zfile.c
index 121e403e8..320ecd500 100644
--- a/psi/zfile.c
+++ b/psi/zfile.c
@@ -1034,7 +1034,7 @@ lib_file_open(gs_file_path_ptr lib_path, const gs_memory_t *mem, i_ctx_t *i_ctx
bool starting_arg_file = (i_ctx_p == NULL) ? true : i_ctx_p->starting_arg_file;
bool search_with_no_combine = false;
bool search_with_combine = false;
- char fmode[4] = { 'r', 0, 0, 0 }; /* room for binary suffix */
+ char fmode[2] = { 'r', 0};
gx_io_device *iodev = iodev_default(mem);
gs_main_instance *minst = get_minst_from_memory(mem);
int code;
@@ -1043,7 +1043,6 @@ lib_file_open(gs_file_path_ptr lib_path, const gs_memory_t *mem, i_ctx_t *i_ctx
if (iodev == 0)
iodev = (gx_io_device *)gx_io_device_table[0];
- strcat(fmode, gp_fmode_binary_suffix);
if (gp_file_name_is_absolute(fname, flen)) {
search_with_no_combine = true;
search_with_combine = false;