Skip to content

Conversation

@whoTBecker
Copy link
Contributor

Check maximum allowed length of service data for incoming mailbox.
Subsequent mailbox services expect a valid length information to access several positions within the mailbox message buffer.

Validate minimum required configured mailbox size.

soes/esc.c Outdated
#include "esc_coe.h"
#include "esc_foe.h"

static_assert((MBXSIZE > ESC_MBXHSIZE) && (MBXSIZEBOOT > ESC_MBXHSIZE), "Mailbox size too small.");
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use CC_STATIC_ASSERT for portability to more toolchains. CC_STATIC_ASSERT does not currently take a message however, but since it is not used otherwise in this repo would could add another argument for the message.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@whoTBecker whoTBecker requested a review from hefloryd April 4, 2025 14:30
@hefloryd hefloryd merged commit 6ef7b94 into OpenEtherCATsociety:master Apr 8, 2025
1 check passed
@hefloryd
Copy link
Contributor

hefloryd commented Apr 8, 2025

Merged, thanks

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.

2 participants