Fix SEGV in tab completion of virsh commands

This commit is contained in:
Daniel P. Berrange 2007-02-27 15:35:50 +00:00
parent a0d210598f
commit 00602abe00
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,8 @@
Tue Feb 27 10:35:35 EST 2007 Daniel P. Berrange <berrange@redhat.com>
* src/virsh.c: Fix SEGV when doing tab-completion of commands
which have no arguments (eg, nodeinfo<TAB>).
Tue Feb 27 10:25:35 EST 2007 Daniel P. Berrange <berrange@redhat.com>
* src/virsh.c: Fix command line argument parsing to make

View File

@ -3207,6 +3207,9 @@ vshReadlineOptionsGenerator(const char *text, int state)
if (!cmd)
return NULL;
if (!cmd->opts)
return NULL;
while ((name = cmd->opts[list_index].name)) {
vshCmdOptDef *opt = &cmd->opts[list_index];
char *res;