cbor-diag
cbor-diag copied to clipboard
Non-well-formed CBOR indefinite length strings allowed
The CBOR
5f 5f 41 00 ff ff
decodes to
(_ h'00')
It should error out per this text:
If any item between the indefinite-length string indicator (0b010_11111 or 0b011_11111) and the "break" stop code is not a definite-length string item of the same major type, the string is not well-formed.
My decoder had an issue with this too.