aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to 'g10')
-rw-r--r--g10/ChangeLog4
-rw-r--r--g10/keyring.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index ae5b29e32..7ac769b6e 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,7 @@
+2010-10-10 Werner Koch <[email protected]>
+
+ * keyring.c (create_tmp_file): Use GNUPG_TMP_SFX anf GNUPG_BAK_SFX.
+
2010-09-28 David Shaw <[email protected]>
* options.skel: Make the example for force-v3-sigs match
diff --git a/g10/keyring.c b/g10/keyring.c
index 4dc662ed9..fb399d4a2 100644
--- a/g10/keyring.c
+++ b/g10/keyring.c
@@ -1182,11 +1182,11 @@ create_tmp_file (const char *template,
strcpy (stpcpy(tmpfname, template), EXTSEP_S "tmp");
}
# else /* Posix file names */
- bakfname = xmalloc (strlen( template ) + 2);
- strcpy (stpcpy (bakfname,template),"~");
+ bakfname = xmalloc (strlen (template) + sizeof (GNUPG_BAK_SFX) + 1);
+ strcpy (stpcpy (bakfname, template), GNUPG_BAK_SFX);
- tmpfname = xmalloc (strlen( template ) + 5);
- strcpy (stpcpy(tmpfname,template), EXTSEP_S "tmp");
+ tmpfname = xmalloc (strlen (template) + sizeof (GNUPG_TMP_SFX) + 1 );
+ strcpy (stpcpy(tmpfname, template), GNUPG_TMP_SFX);
# endif /* Posix filename */
/* Create the temp file with limited access */