Project

General

Profile

Actions

Bug #2227

closed

name::Component::wireDecode logic error

Added by Qiuhan Ding almost 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Base
Target version:
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

Actions #1

Updated by Alex Afanasyev almost 10 years ago

  • Category set to Base
  • Status changed from New to In Progress
  • Assignee set to Qiuhan Ding
  • Target version set to v0.3
Actions #2

Updated by Alex Afanasyev almost 10 years ago

  • Description updated (diff)
Actions #3

Updated by Junxiao Shi almost 10 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)
Actions #4

Updated by Yingdi Yu almost 10 years ago

  • Status changed from In Progress to Code review
  • % Done changed from 0 to 100
Actions #5

Updated by Alex Afanasyev almost 10 years ago

  • Status changed from Code review to Closed
Actions

Also available in: Atom PDF