mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
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>
This commit is contained in:
parent
1ffd475f99
commit
6e85ac77af
16 changed files with 97 additions and 157 deletions
|
@ -215,9 +215,8 @@ prepare_dirmngr (ctrl_t ctrl, assuan_context_t ctx, gpg_error_t err)
|
|||
char *pass = server->pass ? server->pass : "";
|
||||
char *base = server->base ? server->base : "";
|
||||
|
||||
snprintf (line, DIM (line) - 1, "LDAPSERVER %s:%i:%s:%s:%s",
|
||||
snprintf (line, DIM (line), "LDAPSERVER %s:%i:%s:%s:%s",
|
||||
server->host, server->port, user, pass, base);
|
||||
line[DIM (line) - 1] = 0;
|
||||
|
||||
assuan_transact (ctx, line, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
/* The code below is not required because we don't return an error. */
|
||||
|
@ -548,10 +547,9 @@ gpgsm_dirmngr_isvalid (ctrl_t ctrl,
|
|||
NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
did_options = 1;
|
||||
}
|
||||
snprintf (line, DIM(line)-1, "ISVALID%s %s",
|
||||
snprintf (line, DIM(line), "ISVALID%s %s",
|
||||
use_ocsp == 2? " --only-ocsp --force-default-responder":"",
|
||||
certid);
|
||||
line[DIM(line)-1] = 0;
|
||||
xfree (certid);
|
||||
|
||||
rc = assuan_transact (dirmngr_ctx, line, NULL, NULL,
|
||||
|
@ -803,9 +801,8 @@ gpgsm_dirmngr_lookup (ctrl_t ctrl, strlist_t names, int cache_only,
|
|||
|
||||
return out_of_core ();
|
||||
}
|
||||
snprintf (line, DIM(line)-1, "LOOKUP%s %s",
|
||||
snprintf (line, DIM(line), "LOOKUP%s %s",
|
||||
cache_only? " --cache-only":"", pattern);
|
||||
line[DIM(line)-1] = 0;
|
||||
xfree (pattern);
|
||||
|
||||
parm.ctrl = ctrl;
|
||||
|
@ -861,7 +858,7 @@ get_cached_cert (assuan_context_t ctx,
|
|||
*r_cert = NULL;
|
||||
|
||||
bin2hex (fpr, 20, hexfpr);
|
||||
snprintf (line, DIM(line)-1, "LOOKUP --single --cache-only 0x%s", hexfpr);
|
||||
snprintf (line, DIM(line), "LOOKUP --single --cache-only 0x%s", hexfpr);
|
||||
|
||||
init_membuf (&mb, 4096);
|
||||
err = assuan_transact (ctx, line, get_cached_cert_data_cb, &mb,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue