summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2011-04-07 00:57:36 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2011-04-07 00:57:36 +0200
commitdfeb46a91e7eba6c3582c7ad8104d9cfa03c68a5 (patch)
treec09ffd7f6a8f245f77599e1562f8df67166620cf
parent0c0cb963ea97c665239239eb9671a149eb7c34e3 (diff)
downloadgnutls-dfeb46a91e7eba6c3582c7ad8104d9cfa03c68a5.tar.gz
use correct pointer size.
-rw-r--r--lib/x509/crl.c4
-rw-r--r--lib/x509/x509.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/x509/crl.c b/lib/x509/crl.c
index 7e9f23c074..5408261247 100644
--- a/lib/x509/crl.c
+++ b/lib/x509/crl.c
@@ -1053,7 +1053,7 @@ gnutls_x509_crl_list_import2 (gnutls_x509_crl_t ** crls,
unsigned int init = 1024;
int ret;
- *crls = gnutls_malloc(sizeof(gnutls_x509_crl_t*)*init);
+ *crls = gnutls_malloc(sizeof(gnutls_x509_crl_t)*init);
if (*crls == NULL)
{
gnutls_assert();
@@ -1063,7 +1063,7 @@ int ret;
ret = gnutls_x509_crl_list_import(*crls, &init, data, format, GNUTLS_X509_CRT_LIST_IMPORT_FAIL_IF_EXCEED);
if (ret == GNUTLS_E_SHORT_MEMORY_BUFFER)
{
- *crls = gnutls_realloc_fast(*crls, sizeof(gnutls_x509_crl_t*)*init);
+ *crls = gnutls_realloc_fast(*crls, sizeof(gnutls_x509_crl_t)*init);
if (*crls == NULL)
{
gnutls_assert();
diff --git a/lib/x509/x509.c b/lib/x509/x509.c
index 300ee8e674..f6d3e909cd 100644
--- a/lib/x509/x509.c
+++ b/lib/x509/x509.c
@@ -3104,7 +3104,7 @@ gnutls_x509_crt_list_import2 (gnutls_x509_crt_t ** certs,
unsigned int init = 1024;
int ret;
- *certs = gnutls_malloc(sizeof(gnutls_x509_crt_t*)*init);
+ *certs = gnutls_malloc(sizeof(gnutls_x509_crt_t)*init);
if (*certs == NULL)
{
gnutls_assert();
@@ -3114,7 +3114,7 @@ int ret;
ret = gnutls_x509_crt_list_import(*certs, &init, data, format, GNUTLS_X509_CRT_LIST_IMPORT_FAIL_IF_EXCEED);
if (ret == GNUTLS_E_SHORT_MEMORY_BUFFER)
{
- *certs = gnutls_realloc_fast(*certs, sizeof(gnutls_x509_crt_t*)*init);
+ *certs = gnutls_realloc_fast(*certs, sizeof(gnutls_x509_crt_t)*init);
if (*certs == NULL)
{
gnutls_assert();