diff options
author | Werner Koch <[email protected]> | 2014-12-02 13:13:53 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2014-12-02 13:13:53 +0000 |
commit | fabcf1440a6900b9471f11e4f2a015e9f2d1a74c (patch) | |
tree | 4225436911e628900a6ccb36b790065d9a7256f5 /agent/pkdecrypt.c | |
parent | tools: Improve watchgnupg portability. (diff) | |
download | gnupg-fabcf1440a6900b9471f11e4f2a015e9f2d1a74c.tar.gz gnupg-fabcf1440a6900b9471f11e4f2a015e9f2d1a74c.zip |
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 <[email protected]>
Diffstat (limited to 'agent/pkdecrypt.c')
-rw-r--r-- | agent/pkdecrypt.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/agent/pkdecrypt.c b/agent/pkdecrypt.c index 945de3c51..8c09b8c4e 100644 --- a/agent/pkdecrypt.c +++ b/agent/pkdecrypt.c @@ -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 */ |