From: Nikos Mavrogiannopoulos Date: Wed, 6 Apr 2011 22:57:36 +0000 (+0200) Subject: use correct pointer size. X-Git-Tag: gnutls_2_99_0~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dfeb46a91e7eba6c3582c7ad8104d9cfa03c68a5;p=thirdparty%2Fgnutls.git use correct pointer size. --- 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();