]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
use correct pointer size.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Wed, 6 Apr 2011 22:57:36 +0000 (00:57 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Wed, 6 Apr 2011 22:57:36 +0000 (00:57 +0200)
lib/x509/crl.c
lib/x509/x509.c

index 7e9f23c074f968bccbf48824f0ba5291181eb64d..54082612470fb1742322ba100f283407056aab53 100644 (file)
@@ -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();
index 300ee8e674b6370267908603e2c89b794659ac37..f6d3e909cd38c7cbbc835fa6a0660a46cef08772 100644 (file)
@@ -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();