diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2016-10-21 05:04:46 +0200 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2016-10-21 05:04:46 +0200 |
commit | 6e85ac77af594035137950d801d8a1bacce548a3 (patch) | |
tree | 9886172b88af046b48da1a4be262adc70ded234e /g10/openfile.c | |
parent | agent: Fix saving with FORCE=1. (diff) | |
download | gnupg2-6e85ac77af594035137950d801d8a1bacce548a3.tar.xz gnupg2-6e85ac77af594035137950d801d8a1bacce548a3.zip |
Fix use cases of snprintf.
* agent/call-pinentry.c, agent/call-scd.c, agent/command.c,
build-aux/speedo/w32/g4wihelp.c, common/get-passphrase.c,
dirmngr/dirmngr.c, g10/call-agent.c, g10/cpr.c, g10/keygen.c,
g10/openfile.c, g10/passphrase.c, scd/app-openpgp.c, scd/scdaemon.c,
sm/call-agent.c, sm/call-dirmngr.c, sm/certreqgen.c: Fix assuming C99.
--
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'g10/openfile.c')
-rw-r--r-- | g10/openfile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/g10/openfile.c b/g10/openfile.c index 006ff35cd..ad256048a 100644 --- a/g10/openfile.c +++ b/g10/openfile.c @@ -148,9 +148,9 @@ ask_outfile_name( const char *name, size_t namelen ) n = strlen(s) + (defname?strlen (defname):0) + 10; prompt = xmalloc (n); if (defname) - snprintf (prompt, n-1, "%s [%s]: ", s, defname ); + snprintf (prompt, n, "%s [%s]: ", s, defname ); else - snprintf (prompt, n-1, "%s: ", s ); + snprintf (prompt, n, "%s: ", s ); tty_enable_completion(NULL); fname = cpr_get ("openfile.askoutname", prompt ); cpr_kill_prompt (); |