summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2012-07-20 13:48:17 +0100
committerChris Liddell <chris.liddell@artifex.com>2012-07-20 13:49:55 +0100
commit3f0bee24591c8f690bd121fee272d925247ce307 (patch)
tree217d9a482cbf2c37b7bb5dcd6ed61bf8c27ceb36
parent39f5af403d9cf49b9419a85e3569436907ade65d (diff)
downloadghostpdl-3f0bee24591c8f690bd121fee272d925247ce307.tar.gz
Stamp on a warning in fapiufst.c
Sort out the path length, and parameters to strncat() with the stand gs maximum path length value. No cluster differences.
-rw-r--r--gs/psi/fapiufst.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gs/psi/fapiufst.c b/gs/psi/fapiufst.c
index cf90ffecb..2f81c47e6 100644
--- a/gs/psi/fapiufst.c
+++ b/gs/psi/fapiufst.c
@@ -1702,7 +1702,7 @@ int gs_fapiufst_instantiate(i_plugin_client_memory *client_mem, i_plugin_instanc
i_ctx_t *i_ctx_p = NULL;
gs_main_instance *inst;
ref entry;
- char tmppath[512];
+ char tmppath[gp_file_name_sizeof];
int code = 0;
if (r == 0)
@@ -1723,20 +1723,20 @@ int gs_fapiufst_instantiate(i_plugin_client_memory *client_mem, i_plugin_instanc
/* The following entries will get overwritten if the user specifies alternative settings
* on the command line.
*/
- strncpy(tmppath, UFSTFONTDIR, sizeof(tmppath));
- strncat(tmppath, UFST_PlugIn_Path, sizeof(tmppath));
+ strncpy(tmppath, UFSTFONTDIR, gp_file_name_sizeof);
+ strncat(tmppath, UFST_PlugIn_Path, gp_file_name_sizeof - strlen(tmppath));
fapiu_make_string (i_ctx_p, (const char *)tmppath, &entry);
(void)dict_put_string(systemdict, UFST_PlugIn_Str, &entry, NULL);
- strncpy(tmppath, UFSTFONTDIR, sizeof(tmppath));
- strncat(tmppath, FCOfontfilePath, sizeof(tmppath));
+ strncpy(tmppath, UFSTFONTDIR, gp_file_name_sizeof);
+ strncat(tmppath, FCOfontfilePath, gp_file_name_sizeof - strlen(tmppath));
fapiu_make_string (i_ctx_p, (const char *)tmppath, &entry);
(void)dict_put_string(systemdict, FCOfontfileStr, &entry, NULL);
- strncpy(tmppath, UFSTFONTDIR, sizeof(tmppath));
- strncat(tmppath, FCOfontfile2Path, sizeof(tmppath));
+ strncpy(tmppath, UFSTFONTDIR, gp_file_name_sizeof);
+ strncat(tmppath, FCOfontfile2Path, gp_file_name_sizeof - strlen(tmppath));
fapiu_make_string (i_ctx_p, (const char *)tmppath, &entry);
(void)dict_put_string(systemdict, FCOfontfile2Str, &entry, NULL);