diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2009-11-05 23:09:51 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2009-11-05 23:11:15 +0200 |
commit | 498e2a1ae31441f5d5b92a2765fa28f36bedb4aa (patch) | |
tree | 2a9c12c9180fbacb20991df18730df5ad5e2812b /libextra | |
parent | ed4a6d07ee08f457a7e0cd7edcd956b1f9ad6a49 (diff) | |
download | gnutls-498e2a1ae31441f5d5b92a2765fa28f36bedb4aa.tar.gz |
Cleanups and several bug fixes found by Tomas Mraz.
"I've patched the following problems in the code found by review of
gnutls-2.8.5 code done by Steve Grubb.
See the patch attached.
The gnutls_constate.c bug might be potentially serious so I've decided
to mail it to you directly, not to the public mailing list.
The auth_cert.c change is just cleanup of the code.
In gnutls_openssl.c I've just fixed the potential crasher, correct fix
would require using asprintf or precomputed length of the buffer to
allocate a memory.
The certtool.c change is again just a cleanup."
Diffstat (limited to 'libextra')
-rw-r--r-- | libextra/gnutls_openssl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libextra/gnutls_openssl.c b/libextra/gnutls_openssl.c index 38ae5a86cf..fee62f6b49 100644 --- a/libextra/gnutls_openssl.c +++ b/libextra/gnutls_openssl.c @@ -887,9 +887,10 @@ X509_get_issuer_name (const X509 * cert) char * X509_NAME_oneline (gnutls_x509_dn * name, char *buf, int len) { - memset (buf, 0, len); + /* XXX openssl allocates buffer if buf == NULL */ if (!buf) return NULL; + memset (buf, 0, len); snprintf (buf, len - 1, "C=%s, ST=%s, L=%s, O=%s, OU=%s, CN=%s/Email=%s", |