From 6f7ed0590060cc013946e192f725545445e6c39f Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 29 Jul 2003 08:53:19 +0000 Subject: * gpgsm.c (main): Add secmem features and set the random seed file. (gpgsm_exit): Update the random seed file and enable debug output. * g10.c (main): Add secmem features and set the random seed file. (g10_exit): Update the random seed file. * parse-packet.c (parse_signature,read_protected_v3_mpi) (parse_key): Fixed use of mpi_set_opaque. * keygen.c (gen_card_key): Ditto. --- g10/comment.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'g10/comment.c') diff --git a/g10/comment.c b/g10/comment.c index ab5d2941e..b52104cd7 100644 --- a/g10/comment.c +++ b/g10/comment.c @@ -63,19 +63,24 @@ write_comment( iobuf_t out, const char *s ) KBNODE -make_comment_node( const char *s ) +make_comment_node_from_buffer (const char *s, size_t n) { PACKET *pkt; - size_t n = strlen(s); - pkt = xcalloc (1, sizeof *pkt ); + pkt = gcry_xcalloc( 1, sizeof *pkt ); pkt->pkttype = PKT_COMMENT; - pkt->pkt.comment = xmalloc ( sizeof *pkt->pkt.comment + n - 1 ); + pkt->pkt.comment = gcry_xmalloc( sizeof *pkt->pkt.comment + n - 1 ); pkt->pkt.comment->len = n; strcpy(pkt->pkt.comment->data, s); return new_kbnode( pkt ); } +KBNODE +make_comment_node( const char *s ) +{ + return make_comment_node_from_buffer (s, strlen (s)); +} + KBNODE make_mpi_comment_node( const char *s, gcry_mpi_t a ) -- cgit v1.2.3