mgmt,rib: check command length before accessing verb
refs: #2151
Change-Id: I0e67fd4b4df10d842648797ed42771af7c53a938
diff --git a/tests/rib/rib-manager.cpp b/tests/rib/rib-manager.cpp
index afef2f3..39a4a5d 100644
--- a/tests/rib/rib-manager.cpp
+++ b/tests/rib/rib-manager.cpp
@@ -71,8 +71,11 @@
void receiveCommandInterest(Name& name, ControlParameters& parameters)
{
- name.append(parameters.wireEncode());
+ receiveCommandInterest(name.append(parameters.wireEncode()));
+ }
+ void receiveCommandInterest(const Name& name)
+ {
Interest command(name);
face->receive(command);
@@ -116,6 +119,13 @@
BOOST_FIXTURE_TEST_SUITE(RibManager, RibManagerFixture)
+BOOST_FIXTURE_TEST_CASE(ShortName, AuthorizedRibManager)
+{
+ Name commandName("/localhost/nfd/rib");
+ receiveCommandInterest(commandName);
+ // TODO verify error response
+}
+
BOOST_FIXTURE_TEST_CASE(Basic, AuthorizedRibManager)
{
ControlParameters parameters;