Skip to content
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

Remove incorrect assert in serdata_pserop_fix #1773

Merged
merged 1 commit into from
Jul 19, 2023

Conversation

eboasson
Copy link
Contributor

It is incorrect to assert that payload should be at least 16 bytes large in for the "pserop" sertype. That condition is only valid if the topic is keyed, because it only supports keys that are exactly 16 bytes large.

Instead, for an unkeyed topic, anything size is plausible and it is the deserializer that rejects malformed input.

This commit also adds some tests for some variations on the participant message data theme, including one that triggers the assertion. in addition there is a bit of additional checking in constructing a new sertype_pserop.

Fixes #1771

It is incorrect to assert that payload should be at least 16 bytes large
in for the "pserop" sertype.  That condition is only valid if the topic
is keyed, because it only supports keys that are exactly 16 bytes large.

Instead, for an unkeyed topic, anything size is plausible and it is the
deserializer that rejects malformed input.

This commit also adds some tests for some variations on the participant
message data theme, including one that triggers the assertion.  in
addition there is a bit of additional checking in constructing a new
sertype_pserop.

Signed-off-by: Erik Boasson <eb@ilities.com>
@eboasson eboasson merged commit 718e747 into eclipse-cyclonedds:master Jul 19, 2023
18 of 20 checks passed
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.

Another remotely reachable assertion in ddsi_serdata_pserop.c
2 participants