Skip to content

Commit

Permalink
dtls: malloc needs to allocate the size of the dereferenced object
Browse files Browse the repository at this point in the history
  • Loading branch information
julek-wolfssl committed Jan 30, 2025
1 parent 9a8bc24 commit c36d230
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dtls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c36d230

Please sign in to comment.