Skip to content

fix for memory issue due to missed WOLFSSL_GENERAL_NAME capability cha…#8155

Merged
douzzer merged 2 commits intowolfSSL:masterfrom
JacobBarthelmeh:x509_req
Nov 12, 2024
Merged

fix for memory issue due to missed WOLFSSL_GENERAL_NAME capability cha…#8155
douzzer merged 2 commits intowolfSSL:masterfrom
JacobBarthelmeh:x509_req

Conversation

@JacobBarthelmeh
Copy link
Copy Markdown
Contributor

…nges

Reproduced when testing a wolfCLU unit test with -fsanitize=address.

@JacobBarthelmeh
Copy link
Copy Markdown
Contributor Author

Re-testing mosquitto Tests / 2.0.18. Looks like a time out:

1474 tests total
1474 tests succeeded
./test.py
Error: The operation was canceled.

Copy link
Copy Markdown
Contributor

@douzzer douzzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C++ warning needs a fix (cast the ret from XMALLOC):

./src/x509.c: In function ‘int DNS_to_GENERAL_NAME(WOLFSSL_GENERAL_NAME*, DNS_entry*)’:
9386a882b9 (<juliusz@wolfssl.com> 2021-10-19 15:51:29 +0200 594)                 #define XMALLOC(s, h, t)     ((void)(h), (void)(t), wolfSSL_Malloc((s)))
./wolfssl/wolfcrypt/types.h:594:67: error: invalid conversion from ‘void*’ to ‘const unsigned char*’ [-fpermissive]
  594 |                 #define XMALLOC(s, h, t)     ((void)(h), (void)(t), wolfSSL_Malloc((s)))
      |                                              ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
      |                                                                   |
      |                                                                   void*
5647f5c82f (<jacob@wolfssl.com> 2024-11-06 17:10:54 -0700 634)             gn->d.registeredID->obj = XMALLOC(dns->len,

@douzzer douzzer merged commit 878cf3a into wolfSSL:master Nov 12, 2024
@JacobBarthelmeh JacobBarthelmeh changed the title fix for memory leak due to missed WOLFSSL_GENERAL_NAME capability cha… fix for memory issue due to missed WOLFSSL_GENERAL_NAME capability cha… Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants