Actions
Bug #2227
closedname::Component::wireDecode logic error
Start date:
11/25/2014
Due date:
% Done:
100%
Estimated time:
0.50 h
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
      
      Updated by Alex Afanasyev almost 11 years ago
      
    
    - Category set to Base
 - Status changed from New to In Progress
 - Assignee set to Qiuhan Ding
 - Target version set to v0.3
 
      
      Updated by Junxiao Shi almost 11 years ago
      
    
    - 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)
      
      Updated by Yingdi Yu almost 11 years ago
      
    
    - Status changed from In Progress to Code review
 - % Done changed from 0 to 100
 
      
      Updated by Alex Afanasyev almost 11 years ago
      
    
    - Status changed from Code review to Closed
 
Actions