From: Nikos Mavrogiannopoulos Date: Sun, 4 May 2014 10:35:52 +0000 (+0200) Subject: initialize to null the SRP extension data on allocation. X-Git-Tag: gnutls_3_3_2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b856457b6a6d5c3eaa2a9944f93e0db0146ae384;p=thirdparty%2Fgnutls.git initialize to null the SRP extension data on allocation. Issue identified using valgrind and the Codenomicon TLS test suite. --- diff --git a/lib/ext/srp.c b/lib/ext/srp.c index 7dd98df74e..ca5710ed70 100644 --- a/lib/ext/srp.c +++ b/lib/ext/srp.c @@ -126,7 +126,7 @@ _gnutls_srp_send_params(gnutls_session_t session, if (cred == NULL) return 0; - priv = gnutls_malloc(sizeof(*priv)); + priv = gnutls_calloc(1, sizeof(*priv)); if (priv == NULL) return gnutls_assert_val(GNUTLS_E_MEMORY_ERROR);