From 4e50d2f1f8adb1bef9187dab1b7cffdc7bc4fb8c Mon Sep 17 00:00:00 2001 From: Mohsin Kazmi Date: Thu, 9 Nov 2017 13:30:59 +0100 Subject: VOM: Inspect: fix the bug If key is passed without ":", results in segmentation fault. This patch fixes this issue. Change-Id: I4e6bb3431c261cc2ac752b966a11edd7aa3304a0 Signed-off-by: Mohsin Kazmi --- src/vpp-api/vom/inspect.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/vpp-api/vom') diff --git a/src/vpp-api/vom/inspect.cpp b/src/vpp-api/vom/inspect.cpp index c78128c2bb6..55b533bbbff 100644 --- a/src/vpp-api/vom/inspect.cpp +++ b/src/vpp-api/vom/inspect.cpp @@ -54,10 +54,9 @@ inspect::handle_input(const std::string& message, std::ostream& output) } } else if (message.find("keys") != std::string::npos) { OM::dump(output); - } else if (message.find("key") != std::string::npos) { + } else if (message.find("key:") != std::string::npos) { std::vector results; boost::split(results, message, boost::is_any_of(":\n")); - OM::dump(results[1], output); } else if (message.find("all") != std::string::npos) { /* -- cgit 1.2.3-korg