From ce935fddadc0958a7902576c3dcf039a99f62685 Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Mon, 11 Nov 2024 09:57:33 -0700 Subject: [PATCH] cast return of XMALLOC --- src/x509.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/x509.c b/src/x509.c index a74f5093a8..0f39c21f66 100644 --- a/src/x509.c +++ b/src/x509.c @@ -631,7 +631,7 @@ static int DNS_to_GENERAL_NAME(WOLFSSL_GENERAL_NAME* gn, DNS_entry* dns) if (gn->d.registeredID == NULL) { return WOLFSSL_FAILURE; } - gn->d.registeredID->obj = XMALLOC(dns->len, + gn->d.registeredID->obj = (const unsigned char*)XMALLOC(dns->len, gn->d.registeredID->heap, DYNAMIC_TYPE_ASN1); if (gn->d.registeredID->obj == NULL) { /* registeredID gets free'd up by caller after failure */