aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Valter <d-valter@yandex-team.com>2023-12-05 17:16:57 +0000
committerDave Wallace <dwallacelf@gmail.com>2023-12-07 15:44:43 +0000
commitcaf12e6ab6d01854ee6399fec3dbb578eba1e596 (patch)
treea8e57431b3178b31dcf2550eacfe0eaaa67122a7
parentadb2c6799238b58d98600d9a2f5d002e7cce14e0 (diff)
misc: fix tracedump `show graph` out-of-buffer
Use the correct string type for vlib_get_node_by_name. Found by ASAN. Type: fix Signed-off-by: Dmitry Valter <d-valter@yandex-team.com> Change-Id: I679d27050487e013e3320a4c558d78fa60c5e98a
-rw-r--r--src/plugins/tracedump/graph_cli.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/tracedump/graph_cli.c b/src/plugins/tracedump/graph_cli.c
index 2440295a1a7..2de191b2348 100644
--- a/src/plugins/tracedump/graph_cli.c
+++ b/src/plugins/tracedump/graph_cli.c
@@ -75,9 +75,9 @@ graph_node_show_cmd (vlib_main_t * vm,
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (input, "node %d", &index))
- n = vlib_get_node (vm, index);
- else if (unformat (input, "node %v", &name))
- n = vlib_get_node_by_name (vm, name);
+ n = vlib_get_node (vm, index);
+ else if (unformat (input, "node %s", &name))
+ n = vlib_get_node_by_name (vm, name);
else if (unformat (input, "want_arcs"))
want_arcs = true;