When one starts VPP, types a command, presses up rather than enter,
then types a new command, unix_cli_line_process_one() segfaults.
This is due to cf->cursor not being reset upon pressing up if the
history is empty.
Change-Id: Ie503f20a9cb551e735abb8b0f4feb8c0006d2b61
Signed-off-by: Yoann Desmouceaux <ydesmouc@cisco.com>
unix_vlib_cli_output_cooked (cf, uf, cf->current_command,
vec_len (cf->current_command));
}
- cf->cursor = vec_len (cf->current_command);
-
- break;
}
+ cf->cursor = vec_len (cf->current_command);
break;
case UNIX_CLI_PARSE_ACTION_HOME: