cabo / cbor-diag

CBOR diagnostic utilities
55 stars 10 forks source link

Non-well-formed CBOR indefinite length strings allowed #10

Open laurencelundblade opened 5 years ago

laurencelundblade commented 5 years ago

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.