gpg: Replace two sprintf calls.
authorWerner Koch <wk@gnupg.org>
Mon, 24 Oct 2016 11:12:05 +0000 (13:12 +0200)
committerWerner Koch <wk@gnupg.org>
Mon, 24 Oct 2016 11:12:05 +0000 (13:12 +0200)
commit9d6146d6f9870fbfcec15cdc4becaf094d5a90e0
treedc8a2eda5978e6e955497b302491bca7b71dcc78
parent8c40b3b98d3ddeda79fde981e6539c5b3b09d9a2
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>
g10/keygen.c