]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
initialize to null the SRP extension data on allocation.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 4 May 2014 10:35:52 +0000 (12:35 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 4 May 2014 10:35:54 +0000 (12:35 +0200)
Issue identified using valgrind and the Codenomicon TLS test suite.

lib/ext/srp.c

index 7dd98df74e86998836e062c9c58c49e9d8c9522f..ca5710ed7088330ee3483552acbd53f7afb192c3 100644 (file)
@@ -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);