Skip to content

ZD16445#6724

Merged
JacobBarthelmeh merged 1 commit intowolfSSL:masterfrom
julek-wolfssl:zd/16445
Aug 24, 2023
Merged

ZD16445#6724
JacobBarthelmeh merged 1 commit intowolfSSL:masterfrom
julek-wolfssl:zd/16445

Conversation

@julek-wolfssl
Copy link
Copy Markdown
Member

  • Use unions for type punning in xor API
  • Initialise potentially uninitialised variables
  • Use LL suffix to specify a larger integer type
  • Don't use max as it can shadow other definitions

- Use unions for type punning in xor API
- Initialise potentially uninitialised variables
- Use `LL` suffix to specify a larger integer type
- Don't use `max` as it can shadow other definitions
Comment thread wolfcrypt/src/misc.c
union {
const byte* bp;
const wolfssl_word* wp;
} tpb, tpm;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would this type punning have unintended consequences for C++ builds of wolfSSL?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't think so. We test building with c++ compilers in jenkins and github actions and both are happy with it.

@JacobBarthelmeh JacobBarthelmeh merged commit a6257ca into wolfSSL:master Aug 24, 2023
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