cli: Validate cli_file_index on quit command 02/13302/2
authorSteve Shin <jonshin@cisco.com>
Fri, 29 Jun 2018 16:40:20 +0000 (09:40 -0700)
committerDave Barach <openvpp@barachs.net>
Sat, 30 Jun 2018 13:50:21 +0000 (13:50 +0000)
commit0d5a195ce457a62b60ae59d451067f3fd26f57c9
treead5c4f02705847800b8016b9494890a3ea14ca94
parent0d60a0f8280fa7c902230a38956b1653e1ec7f3e
cli: Validate cli_file_index on quit command

VPP crash happens with 'vppctl quit quit' command. The 2nd quit command
tries to access the file index which is already freed by the first quit.
This can be avoided to validate cli_file_index.

Change-Id: I880514c93523db2a727d7510c97950582cd6a6c8
Signed-off-by: Steve Shin <jonshin@cisco.com>
src/vlib/unix/cli.c