Home GnuPG
Diffusion GnuPG 9d6146d6f987

gpg: Replace two sprintf calls.
9d6146d6f987Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

gpg: Replace two sprintf calls.

* g10/keygen.c (print_status_key_created): Use snprintf for now.
(ask_expire_interval): Replace xmalloc and sprintf by xasprintf.

Future updates: Replace code like

r = xcalloc (1, sizeof *r + 20 );
r->key = pKEYLENGTH;
sprintf( r->u.value, "%u", info.key_attr[0].nbits);

by something like

r = new_r_with_value ("%u", info.key_attr[0].nbits);
r->key = pKEYLENGTH;
  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Oct 24 2016, 1:12 PM
Parents
rG8c40b3b98d3d: agent: Minor cleanup for recent change in findkey.c
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rG9d6146d6f987: gpg: Replace two sprintf calls. (authored by Werner Koch <wk@gnupg.org>).Oct 24 2016, 1:12 PM