cbor-diag icon indicating copy to clipboard operation
cbor-diag copied to clipboard

Non-well-formed CBOR indefinite length strings allowed

Open laurencelundblade opened this issue 5 years ago • 0 comments

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.

laurencelundblade avatar Jul 29 '19 05:07 laurencelundblade