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

Improved early detection of invalid syncs in FusionEngineDecoder. #288

Merged
merged 5 commits into from
Dec 14, 2023

Conversation

adamshapiro0
Copy link
Collaborator

Changes

  • Added C++ message_decode example app using FusionEngineFramer class, and renamed previous app to raw_message_decode

Fixes

  • Use the header reserved bytes to detect invalid syncs early when the (bogus) payload length is very large but smaller than the max packet size

Renamed the previous example to raw_message_decode.
This may change in the future, but for now we assume that the reserved bytes are
always 0. This allows us to detect invalid syncs with extremely large (bogus)
payload sizes that would otherwise cause us to capture a lot of data before we
could detect an invalid CRC.
@adamshapiro0 adamshapiro0 requested a review from axlan December 13, 2023 23:48
@adamshapiro0 adamshapiro0 self-assigned this Dec 13, 2023
Copy link
Collaborator

@axlan axlan left a comment

Choose a reason for hiding this comment

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

A couple minor comments but LGTM.

@adamshapiro0 adamshapiro0 merged commit 187ed5a into master Dec 14, 2023
14 checks passed
@adamshapiro0 adamshapiro0 deleted the invalid-sync branch December 14, 2023 17:43
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