mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
agent: Replace some sprintf.
* agent/call-scd.c (agent_card_pksign): Replace sprintf by bin2hex. * agent/command-ssh.c (ssh_identity_register): Ditto. * agent/pkdecrypt.c (agent_pkdecrypt): Replace sprintf by put_membuf_printf. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
0367a4b8cf
commit
fabcf1440a
3 changed files with 8 additions and 18 deletions
|
@ -94,14 +94,9 @@ agent_pkdecrypt (ctrl_t ctrl, const char *desc_text,
|
|||
goto leave;
|
||||
}
|
||||
|
||||
{
|
||||
char tmpbuf[60];
|
||||
|
||||
sprintf (tmpbuf, "(5:value%u:", (unsigned int)len);
|
||||
put_membuf (outbuf, tmpbuf, strlen (tmpbuf));
|
||||
put_membuf (outbuf, buf, len);
|
||||
put_membuf (outbuf, ")", 2);
|
||||
}
|
||||
put_membuf_printf (outbuf, "(5:value%u:", (unsigned int)len);
|
||||
put_membuf (outbuf, buf, len);
|
||||
put_membuf (outbuf, ")", 2);
|
||||
}
|
||||
else
|
||||
{ /* No smartcard, but a private key */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue