* [Qemu-devel] [PATCH] monitor.c: Fix infinite loop in monitor's auto-complete functionality
@ 2018-02-13 11:59 Dimitris Karagkasidis
2018-02-13 12:46 ` Dr. David Alan Gilbert
0 siblings, 1 reply; 2+ messages in thread
From: Dimitris Karagkasidis @ 2018-02-13 11:59 UTC (permalink / raw)
To: qemu-devel; +Cc: dgilbert
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>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [Qemu-devel] [PATCH] monitor.c: Fix infinite loop in monitor's auto-complete functionality
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
0 siblings, 0 replies; 2+ messages in thread
From: Dr. David Alan Gilbert @ 2018-02-13 12:46 UTC (permalink / raw)
To: Dimitris Karagkasidis; +Cc: qemu-devel, kwolf
* 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-13 12:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.