Bug #4946
closedVAR-NUMBER definition conflicts with canonical order algorithm
100%
Description
Currently, in the definition of VAR-NUMBER, there was no requirement to use the minimum length encoding for any given value.
That is, a TLV-LENGTH of 0x20 MAY be encoded as 0x20, or 0xFD0020, or 0xFE00000020, or even 0xFF0000000000000020.
This has consequences in the canonical ordering and matching code: the suggestion that one can use memcmp
on the wire encoding of the Name field's TLV-VALUE is incorrect.
As currently specified, even a simple equality match for Names must decode each individual T and L value from the top level Name TLV through the component T and L values.
If TLV-LENGTH of one NameComponent was encoded 0x20 and TLV-LENGTH of another NameComponent was encoded 0xFD0020, a simple memcmp will produced an incorrect result.
https://www.lists.cs.ucla.edu/pipermail/ndn-interest/2019-May/002458.html
Updated by Junxiao Shi almost 6 years ago
- Status changed from New to Resolved
- Assignee set to Junxiao Shi
- % Done changed from 0 to 70
Updated by Junxiao Shi almost 6 years ago
- Status changed from Resolved to Closed
- % Done changed from 70 to 100