Skip to content

src: codec: Fix SKIP_CRC_VALIDATION panic and hygiene - #8

Open
joaoantoniocardoso wants to merge 6 commits into
bluerobotics:masterfrom
joaoantoniocardoso:split/codec-skip-crc
Open

src: codec: Fix SKIP_CRC_VALIDATION panic and hygiene#8
joaoantoniocardoso wants to merge 6 commits into
bluerobotics:masterfrom
joaoantoniocardoso:split/codec-skip-crc

Conversation

@joaoantoniocardoso

Copy link
Copy Markdown
Member

Fix SKIP_CRC_VALIDATION panic, add tests, and minor codec/v2 cleanup.

Made with Cursor

@joaoantoniocardoso
joaoantoniocardoso marked this pull request as ready for review July 4, 2026 01:54
Comment thread tests/skip_crc_test.rs
assert!(len >= 2, "packet must have at least two bytes to corrupt");
buf[len - 2] = buf[len - 2].wrapping_add(1);
buf[len - 1] = buf[len - 1].wrapping_add(1);
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

for V2, you need to check if buf[2] has first bit on.

The packet is signed (a signature has been appended to the packet).

If that's the case, the crc will be in buf[len - 13 - 2] and buf[len - 13 - 1]

Comment thread tests/skip_crc_test.rs
);
assert!(
buf.is_empty(),
"F3: {} of {total} bytes remained after a single successful decode",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What is F3 ?

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