Project

General

Profile

Bug #2629

Exclude: cannot decode ImplicitSha256DigestComponent

Added by Ilya Moiseenko about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Base
Target version:
Start date:
03/09/2015
Due date:
% Done:

100%

Estimated time:
1.50 h

Description

Snippet to reproduce:

// g++ -std=c++0x x.cpp $(pkg-config --cflags --libs libndn-cxx)
#include <ndn-cxx/exclude.hpp>

using ndn::Exclude;
using ndn::Block;

int
main()
{
  uint8_t WIRE[] = {
    0x10, 0x22, // Exclude
          0x01, 0x20, // ImplicitSha256DigestComponent
                0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
                0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
                0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
                0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd
  };

  Block block(WIRE, sizeof(WIRE));

  Exclude exclude;
  exclude.wireDecode(block);

  return 0;
}

Expect: no error

Actual: Exclude::wireDecode throws ndn::Exclude::Error


Files

consumer-exclude.cpp (2.76 KB) consumer-exclude.cpp Ilya Moiseenko, 03/09/2015 05:22 PM

Also available in: Atom PDF