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
This commit is contained in:
Dmitry Valter
2023-12-05 17:16:57 +00:00
committed by Dave Wallace
parent adb2c67992
commit caf12e6ab6

View File

@@ -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;