Bug #2227
closed
name::Component::wireDecode logic error
Added by Qiuhan Ding almost 10 years ago.
Updated almost 10 years ago.
Description
Steps to Reproduce:
decode the the wire data of a NameComponent
(generate a common NameComponent, encode that and then decode that)
Expected: No error
Actual: terminating with uncaught exception of type ndn::name::Component::Error: name::Component::wireDecode called on not a NameComponent or ImplicitSha256DigestComponent TLV wire block
- Category set to Base
- Status changed from New to In Progress
- Assignee set to Qiuhan Ding
- Target version set to v0.3
- Description updated (diff)
- Subject changed from There is Logic Error in wireDecode function of NameComponent to name::Component::wireDecode logic error
- Description updated (diff)
- Priority changed from Normal to High
- Estimated time set to 0.50 h
Proposed Fix:
Just change the line:
if (wire.type() != tlv::NameComponent || wire.type() != tlv::ImplicitSha256DigestComponent)
into:
if (wire.type() != tlv::NameComponent && wire.type() != tlv::ImplicitSha256DigestComponent)
- Status changed from In Progress to Code review
- % Done changed from 0 to 100
- Status changed from Code review to Closed
Also available in: Atom
PDF