Project

General

Profile

Bug #2227

Updated by Junxiao Shi over 9 years ago

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 
 

 Fix: 

 Just change the line: 

     if (wire.type() != tlv::NameComponent || wire.type() != tlv::ImplicitSha256DigestComponent) 

 into: 

     if (wire.type() != tlv::NameComponent && wire.type() != tlv::ImplicitSha256DigestComponent) 

 would fix this bug.

Back