Skip to content

Commit c36d230

Browse files
committed
dtls: malloc needs to allocate the size of the dereferenced object
1 parent 9a8bc24 commit c36d230

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dtls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,7 @@ int TLSX_ConnectionID_Use(WOLFSSL* ssl)
12201220
info = (CIDInfo*)XMALLOC(sizeof(CIDInfo), ssl->heap, DYNAMIC_TYPE_TLSX);
12211221
if (info == NULL)
12221222
return MEMORY_ERROR;
1223-
ext = (WOLFSSL**)XMALLOC(sizeof(WOLFSSL**), ssl->heap, DYNAMIC_TYPE_TLSX);
1223+
ext = (WOLFSSL**)XMALLOC(sizeof(WOLFSSL*), ssl->heap, DYNAMIC_TYPE_TLSX);
12241224
if (ext == NULL) {
12251225
XFREE(info, ssl->heap, DYNAMIC_TYPE_TLSX);
12261226
return MEMORY_ERROR;

0 commit comments

Comments
 (0)