[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] monitor.c: Fix infinite loop in monitor's auto-comp
From: |
Dimitris Karagkasidis |
Subject: |
[Qemu-devel] [PATCH] monitor.c: Fix infinite loop in monitor's auto-complete functionality |
Date: |
Tue, 13 Feb 2018 12:59:21 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 |
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 <address@hidden>
---
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
- [Qemu-devel] [PATCH] monitor.c: Fix infinite loop in monitor's auto-complete functionality,
Dimitris Karagkasidis <=