diff options
Diffstat (limited to 'g10/keyring.c')
-rw-r--r-- | g10/keyring.c | 8 |
1 files changed, 4 insertions, 4 deletions
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 */ |