Project

General

Profile

Actions

Bug #1304

closed

Name::get should check bounds

Added by Junxiao Shi over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

// g++ name-get.cpp -lndn-cpp-dev -pthread -lboost_system -lboost_filesystem -lcrypto -lcryptopp -lsqlite3 -lrt

#include <ndn-cpp-dev/name.hpp>

int
main()
{
  ndn::Name name("ndn:/hello");
  std::cout << name.get(999);
  std::cout << name.get(-999);

  return 0;
}

Expected: throw exception

Actual: segmentfault

Actions

Also available in: Atom PDF