summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Schulz <twoaday@gnutls.org>2002-06-14 13:09:49 +0000
committerTimo Schulz <twoaday@gnutls.org>2002-06-14 13:09:49 +0000
commit4934a767bca6d2190baea954ecc89e37d7421fab (patch)
treecbb8ec3dfa014b304b1fdc2dd9fe9656e810fa87
parent8425a956fb14fb9789509e5ff35ffd3b875cf928 (diff)
downloadgnutls-4934a767bca6d2190baea954ecc89e37d7421fab.tar.gz
Corrected the key length calcuation for the key data fields.
-rw-r--r--libextra/gnutls_openpgp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libextra/gnutls_openpgp.c b/libextra/gnutls_openpgp.c
index a15650e89c..5079ab5aab 100644
--- a/libextra/gnutls_openpgp.c
+++ b/libextra/gnutls_openpgp.c
@@ -1555,9 +1555,9 @@ xml_add_mpi( gnutls_datum *xmlkey, CDK_MPI *m, const char *tag )
int i = 0;
p = gnutls_calloc( 1, 2 * ( m->bytes + 3 ) );
- for ( i = 0; i < m->bytes + 2; i++ )
+ for ( i = 0; i < (m->bytes + 2); i++ )
sprintf( p + 2 * i, "%02X", m->data[i] );
- p[2 * m->bytes] = '\0';
+ p[2 * ( m->bytes + 2 )] = '\0';
xml_add_tag( xmlkey, tag, p );
gnutls_free( p );
}