]> git.puffer.fish Git - mirror/frr.git/commit
lib: parser: fix SEGV when Tab hits non-WORD_TKN
authorDavid Lamparter <equinox@opensourcerouting.org>
Thu, 15 Dec 2016 22:53:02 +0000 (23:53 +0100)
committerDavid Lamparter <equinox@opensourcerouting.org>
Fri, 16 Dec 2016 19:42:01 +0000 (20:42 +0100)
commit53d5ec367882becf01cf3c484f3570f10a11618d
tree2c556808b412b073c927fe530b0b4bf7a3640f83
parent7d5718c140611ae125dfab56b94f6a96e19b5922
lib: parser: fix SEGV when Tab hits non-WORD_TKN

If <Tab> processing finds that there is only 1 candidate, but that
candidate is not a WORD_TKN that we can tab-complete on, the status
would remain at CMD_COMPLETE_FULL_MATCH, but the resulting list of
possible completions is empty.

This then SEGVs in lib/vty.c where it tries to access the first element
of the list, assuming FULL_MATCH always has 1 element there...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Cc: Quentin Young <qlyoung@cumulusnetworks.com>
lib/command.c