From c93c90b2fee878f366208464d7b182e2f56d1c46 Mon Sep 17 00:00:00 2001 From: job Date: Thu, 2 Sep 2021 21:37:40 +0000 Subject: [PATCH] Change OPENSSL_malloc to calloc() OK tb@ --- lib/libcrypto/x509/x509_asid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libcrypto/x509/x509_asid.c b/lib/libcrypto/x509/x509_asid.c index 0c35efbfdaa..511002aab81 100644 --- a/lib/libcrypto/x509/x509_asid.c +++ b/lib/libcrypto/x509/x509_asid.c @@ -13,6 +13,7 @@ #include #include +#include #include #include @@ -619,7 +620,7 @@ static int ASIdentifierChoice_canonize(ASIdentifierChoice *choice) ASRange *r; switch (a->type) { case ASIdOrRange_id: - if ((r = OPENSSL_malloc(sizeof(*r))) == NULL) { + if ((r = calloc(1, sizeof(*r))) == NULL) { X509V3error(ERR_R_MALLOC_FAILURE); goto done; } -- 2.20.1