summaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2019-07-09 13:52:26 +0000
committerDave Barach <openvpp@barachs.net>2019-08-02 20:34:31 +0000
commitbe0ffbc70a1acdaf616d437f83ae2df7801775e8 (patch)
treeed1b20cba9854cdef221a149b283c6bc9f724f3d /src/vlib
parent5dedae7291236a399a234ac6fa86f16d9030a0d6 (diff)
vlib: fix out of memory issue
'show node foo' causes infinite loop resulting in out of memory. This patch fixes the issue by breaking the loop on invalid input. Ticket: VPP-1538 Type: fix Fixes: 98afc711c5 Change-Id: Icf2be92e277a7f820d4e08bea9ef22ffbbb116f6 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/node_cli.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vlib/node_cli.c b/src/vlib/node_cli.c
index c8e32b58a69..58b63c366bf 100644
--- a/src/vlib/node_cli.c
+++ b/src/vlib/node_cli.c
@@ -562,6 +562,9 @@ show_node (vlib_main_t * vm, unformat_input_t * input,
else
error = clib_error_return (0, "unknown input '%U'",
format_unformat_error, line_input);
+
+ if (error)
+ break;
}
unformat_free (line_input);