You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fixes
A break code (0xFF) is now rejected wherever a data item is required: in definite-length array elements, definite-length map keys and values, tag content, and at the top level. RFC 8949 Section 3.2.1 only allows it as the terminator of an indefinite-length item, but it was previously accepted as if it were a value.
Truncated input where a data item is required, and the reserved additional information values 0x1C–0x1E of major type 7 (RFC 8949 Section 3), now throw DecodingError.dataCorrupted instead of being silently accepted.
Two-byte simple values below 32 (0xF8 0x00–0xF8 0x1F) are now rejected regardless of options, as required by RFC 8949 Section 3.3. Previously they were rejected only when .basicSimpleValuesOnly was set, and for the wrong reason.
Compatibility notes
Decoding is stricter: the inputs above were accepted by 0.2.0 and now throw DecodingError.dataCorrupted. Well-formed payloads are unaffected.
Decoding empty input now throws DecodingError.dataCorrupted.