From: Jan Kiszka <jan.kis...@siemens.com>

qOffsets has no additional optional parameters. So match the complete
string to avoid stumbling over possible future commands with identical
prefix.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>
---
 gdbstub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdbstub.c b/gdbstub.c
index e4a1a79..cd25d1a 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -1107,7 +1107,7 @@ static int gdb_handle_packet(GDBState *s, const char 
*line_buf)
             break;
         }
 #ifdef CONFIG_USER_ONLY
-        else if (strncmp(p, "Offsets", 7) == 0) {
+        else if (strcmp(p, "Offsets") == 0) {
             TaskState *ts = s->c_cpu->opaque;
 
             snprintf(buf, sizeof(buf),
-- 
2.1.4


Reply via email to