diff options
author | joe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845> | 2018-11-14 16:32:47 +0000 |
---|---|---|
committer | joe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845> | 2018-11-14 16:32:47 +0000 |
commit | e3af24ed520db1bc6f3f7af3fdad7f99b4982ae7 (patch) | |
tree | 7c710b0caafe6a9fa10d4250b5f6114fe761ab58 | |
parent | a7fe338ba825085c610152d60d08fb6e88572b12 (diff) | |
download | neon-e3af24ed520db1bc6f3f7af3fdad7f99b4982ae7.tar.gz |
Merge r2042 from trunk:
* src/ne_gnutls.c (provide_client_cert): Fix allocation size,
submitted by Henrik Holst.
git-svn-id: http://svn.webdav.org/repos/projects/neon/branches/0.30.x@2044 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/ne_gnutls.c | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -1,5 +1,6 @@ Changes in release 0.30.3: * Fixes for OpenSSL 1.1.1 and TLSv1.3 support. +* Fix for crash with GnuTLS in client cert support (Henrik Holst) * Fix possible crash in ne_set_request_flag(). * Add more gcc "nonnull" attributes to ne_request_* functions. diff --git a/src/ne_gnutls.c b/src/ne_gnutls.c index a074fbf..f3e825e 100644 --- a/src/ne_gnutls.c +++ b/src/ne_gnutls.c @@ -660,7 +660,7 @@ static int provide_client_cert(gnutls_session_t session, return ret; } - *pcert = gnutls_malloc(sizeof *pcert); + *pcert = gnutls_calloc(1, sizeof **pcert); gnutls_pcert_import_x509(*pcert, sess->client_cert->cert.subject, 0); *pcert_length = 1; #else /* !HAVE_GNUTLS_CERTIFICATE_SET_RETRIEVE_FUNCTION2 */ |