summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/auth_cert.c2
-rw-r--r--lib/gnutls_cert.c2
-rw-r--r--lib/gnutls_session_pack.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/auth_cert.c b/lib/auth_cert.c
index 358d012186..fb005571f5 100644
--- a/lib/auth_cert.c
+++ b/lib/auth_cert.c
@@ -79,7 +79,7 @@ _gnutls_copy_certificate_auth_info (cert_auth_info_t info,
}
info->raw_certificate_list =
- gnutls_calloc (1, sizeof (gnutls_datum_t) * ncerts);
+ gnutls_calloc (sizeof (gnutls_datum_t), ncerts);
if (info->raw_certificate_list == NULL)
{
gnutls_assert ();
diff --git a/lib/gnutls_cert.c b/lib/gnutls_cert.c
index 2bd1d530ed..94038eb41d 100644
--- a/lib/gnutls_cert.c
+++ b/lib/gnutls_cert.c
@@ -333,7 +333,7 @@ _gnutls_selected_cert_supported_kx (gnutls_session_t session,
return GNUTLS_E_INVALID_REQUEST;
}
- *alg = gnutls_calloc (1, sizeof (gnutls_kx_algorithm_t) * i);
+ *alg = gnutls_calloc (i, sizeof (gnutls_kx_algorithm_t));
if (*alg == NULL)
return GNUTLS_E_MEMORY_ERROR;
diff --git a/lib/gnutls_session_pack.c b/lib/gnutls_session_pack.c
index 39a7f53578..115f17ed1d 100644
--- a/lib/gnutls_session_pack.c
+++ b/lib/gnutls_session_pack.c
@@ -442,7 +442,7 @@ unpack_certificate_auth_info (gnutls_session_t session,
if (info->ncerts > 0)
{
info->raw_certificate_list =
- gnutls_calloc (1, sizeof (gnutls_datum_t) * info->ncerts);
+ gnutls_calloc (info->ncerts, sizeof (gnutls_datum_t));
if (info->raw_certificate_list == NULL)
{
gnutls_assert ();