From 30563ea29705016b08ff04fd8a833940ea94e4e8 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 25 May 2021 13:39:59 +0200 Subject: [PATCH] gpg: Partial fix for Unicode problem in output files. * g10/openfile.c (overwrite_filep): Use gnupg_access. -- As said, this is just an obvious but partial fix. We need to review things for the output module. Signed-off-by: Werner Koch --- common/openpgp-fpr.c | 2 +- g10/openfile.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/openpgp-fpr.c b/common/openpgp-fpr.c index de28c253b..7b110085f 100644 --- a/common/openpgp-fpr.c +++ b/common/openpgp-fpr.c @@ -265,7 +265,7 @@ compute_openpgp_fpr_ecc (int keyversion, unsigned long timestamp, { if (!kdf || !kdflen || !kdf[0]) { - /* No KDF givem - use the default. */ + /* No KDF given - use the default. */ kdflen = 4; kdf = default_ecdh_params (curvebits); } diff --git a/g10/openfile.c b/g10/openfile.c index 12a232a19..5ca168a13 100644 --- a/g10/openfile.c +++ b/g10/openfile.c @@ -64,7 +64,7 @@ overwrite_filep( const char *fname ) if ( iobuf_is_pipe_filename (fname) ) return 1; /* Writing to stdout is always okay. */ - if ( access( fname, F_OK ) ) + if ( gnupg_access( fname, F_OK ) ) return 1; /* Does not exist. */ if ( !compare_filenames (fname, NAME_OF_DEV_NULL) )