Skip to content

fix: Add size validation to named and unnamed message sending #3043

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Sep 6, 2024

Conversation

larus
Copy link
Member

@larus larus commented Sep 4, 2024

Size validation added to the 4 entry points for Named/Unnamed message functions, where there is context to have more descriptive error messages as oppose to the generic serialisation messages you'll get when deeper in the call stack.

A few more details are also added to other places for better errors in generic message sending, like the TryBeginWrite check where the batch message header might push the message over the limit but you'd get a stange "Attempted to write without first calling TryBeginWrite()" later on.

MTTB-378

fix: #2363

Changelog

  • Added message size validation to named and unnamed message sending functions for better error messages.

Testing and Documentation

  • Tests added

@larus larus requested a review from a team as a code owner September 4, 2024 22:00
@larus larus changed the title Fix: Add size validation to named and unnamed message sending fix: Add size validation to named and unnamed message sending Sep 5, 2024
Copy link
Collaborator

@NoelStephensUnity NoelStephensUnity left a comment

Choose a reason for hiding this comment

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

Nicely done.
Thank you Larus!

NoelStephensUnity added a commit that referenced this pull request Sep 6, 2024
Adding the fixes from #3043
NoelStephensUnity added a commit that referenced this pull request Sep 6, 2024
Adding the tests from #3043
@NoelStephensUnity NoelStephensUnity enabled auto-merge (squash) September 6, 2024 22:56
@NoelStephensUnity NoelStephensUnity merged commit 67b27b7 into develop Sep 6, 2024
24 checks passed
@NoelStephensUnity NoelStephensUnity deleted the fix/add-size-validation-to-namedmessage branch September 6, 2024 23:05
NoelStephensUnity added a commit that referenced this pull request Sep 7, 2024
…t] (#3049)

* fix

Adding the fixes from #3043

* test

Adding the tests from #3043

* update

Adding changelog entry

* fix

Check for CustomMessageManager existing before invoking.
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.

Write past end of buffer error when sending byte[] using SendNamedMessage
3 participants