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

feat: simple type support #145

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

beltram
Copy link

@beltram beltram commented Nov 27, 2024

Hi,

I've crated this PR to add support for CBOR Simple types as defined in RFC 8949 Section 3.3.

I've roughly used the same approach you used for tags. I chose to fail in case a reserved simple type was used (0..=19) or (24..=31) and I think this is what causes the fuzzer to fail. He also seems not to differentiate one-byte and two-byte variants of simple types which causes some other errors in the fuzzer. I would like some pointers from your side to understand what happens under the hood and how to fix that.

Additionally, I wanted to take advantage of this PR to introduce a new variant Value::Undefined instead of Value::Simple(23). I think that's fine since the enum in #[non_exhaustive]. Let me know if that sounds reasonable to you.

Any help getting this PR fixed and merged will be very appreciated :)

Thank you

Closes #60

Signed-off-by: beltram <beltram.maldant@gmail.com>
@beltram beltram requested a review from a team as a code owner November 27, 2024 10:44
@beltram beltram requested a review from haraldh November 27, 2024 10:44
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.

[Feature]: Support for decoding unassigned simple values
1 participant