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

Possible typo in float-16 NaN encoding #53

Closed
BrianSipos opened this issue Mar 5, 2017 · 1 comment · Fixed by #123
Closed

Possible typo in float-16 NaN encoding #53

BrianSipos opened this issue Mar 5, 2017 · 1 comment · Fixed by #123
Labels

Comments

@BrianSipos
Copy link

In current master/src/cbor/encoding.c line 140, there appears to be a constant encoded value for 16-bit float NaN value as 0x00e700. I think this is a typo as RFC 7049 in Section 3.9 states that

If NaN is an allowed value, it must always be represented as 0xf97e00

Notice the first data octet difference e7 vs 7e.
The same 7e00 encoding comes up in the RFC 7049 NaN example in Appendix A.

@PJK PJK added the bug label Mar 12, 2017
@PJK
Copy link
Owner

PJK commented Mar 12, 2017

Yup, looks like you are right. Thanks for reporting :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants