diff --git a/ChangeLog b/ChangeLog index 535b59327c..c6a9bf0bcf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Feb 27 10:35:35 EST 2007 Daniel P. Berrange + + * src/virsh.c: Fix SEGV when doing tab-completion of commands + which have no arguments (eg, nodeinfo). + Tue Feb 27 10:25:35 EST 2007 Daniel P. Berrange * src/virsh.c: Fix command line argument parsing to make diff --git a/src/virsh.c b/src/virsh.c index 6274108887..14b402e579 100644 --- a/src/virsh.c +++ b/src/virsh.c @@ -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;