From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Dimitris Karagkasidis <t.pageflt@gmail.com>
Cc: qemu-devel@nongnu.org, kwolf@redhat.com
Subject: Re: [Qemu-devel] [PATCH] monitor.c: Fix infinite loop in monitor's auto-complete functionality
Date: Tue, 13 Feb 2018 12:46:49 +0000 [thread overview]
Message-ID: <20180213124649.GD2378@work-vm> (raw)
In-Reply-To: <807b2724-7a5f-9d62-55aa-b5b3cf0c9503@gmail.com>
* Dimitris Karagkasidis (t.pageflt@gmail.com) wrote:
> The QEMU monitor enters an infinite loop when trying to auto-complete commands
> that accept only optional parameters. The commands currently affected by this
> issue are 'info registers' and 'info mtree'.
>
> Signed-off-by: Dimitris Karagkasidis <t.pagef.lt@gmail.com>
Hi Dimitris,
Thanks for that, I guess this has been broken since 48fe86f6.
Your patch does fix it, but I prefer a slightly different fix which I'll
post in a minute, which is a bit more robust to other things going
wrong.
Dave
> ---
> monitor.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/monitor.c b/monitor.c
> index f4992505b1..d8b7270d9b 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -3741,7 +3741,7 @@ static void monitor_find_completion_by_table(Monitor *mon,
> }
> }
> str = args[nb_args - 1];
> - while (*ptype == '-' && ptype[1] != '\0') {
> + while (*ptype == '-' && ptype[2] != '\0') {
> ptype = next_arg_type(ptype);
> }
> switch(*ptype) {
> --
> 2.14.1
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
prev parent reply other threads:[~2018-02-13 12:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-13 11:59 [Qemu-devel] [PATCH] monitor.c: Fix infinite loop in monitor's auto-complete functionality Dimitris Karagkasidis
2018-02-13 12:46 ` Dr. David Alan Gilbert [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180213124649.GD2378@work-vm \
--to=dgilbert@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=t.pageflt@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.