From c36d23029f5d1f8fa103329e2442ac6217fb3fcd Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Thu, 30 Jan 2025 18:03:28 +0100 Subject: [PATCH] dtls: malloc needs to allocate the size of the dereferenced object --- src/dtls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dtls.c b/src/dtls.c index cd3b4b8c4..8c063bd85 100644 --- a/src/dtls.c +++ b/src/dtls.c @@ -1220,7 +1220,7 @@ int TLSX_ConnectionID_Use(WOLFSSL* ssl) info = (CIDInfo*)XMALLOC(sizeof(CIDInfo), ssl->heap, DYNAMIC_TYPE_TLSX); if (info == NULL) return MEMORY_ERROR; - ext = (WOLFSSL**)XMALLOC(sizeof(WOLFSSL**), ssl->heap, DYNAMIC_TYPE_TLSX); + ext = (WOLFSSL**)XMALLOC(sizeof(WOLFSSL*), ssl->heap, DYNAMIC_TYPE_TLSX); if (ext == NULL) { XFREE(info, ssl->heap, DYNAMIC_TYPE_TLSX); return MEMORY_ERROR;