aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2008-02-17 15:26:17 +0000
committerDaniel Jacobowitz <drow@false.org>2008-02-17 15:26:17 +0000
commitd41b6bb462f94453ea71d80fe8f182981a7babc7 (patch)
tree0011481b4e8fcee7ad1638a77c6c8e8ff5e7a4b4 /gdb/gdbserver
parent3f001e8487ff63ab90221ef80344604e806ec193 (diff)
downloadgdb-d41b6bb462f94453ea71d80fe8f182981a7babc7.zip
gdb-d41b6bb462f94453ea71d80fe8f182981a7babc7.tar.gz
gdb-d41b6bb462f94453ea71d80fe8f182981a7babc7.tar.bz2
* server.c (handle_query): Correct length check.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog4
-rw-r--r--gdb/gdbserver/server.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 22563e5..6ec1704 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,7 @@
+2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * server.c (handle_query): Correct length check.
+
2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
* win32-low.c (do_initial_child_stuff): Add process handle
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index bcb440c..79bde64 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -649,7 +649,7 @@ handle_query (char *own_buf, int packet_len, int *new_packet_len_p)
char *mon = malloc (PBUFSIZ);
int len = strlen (own_buf + 6);
- if ((len % 1) != 0 || unhexify (mon, own_buf + 6, len / 2) != len / 2)
+ if ((len % 2) != 0 || unhexify (mon, own_buf + 6, len / 2) != len / 2)
{
write_enn (own_buf);
free (mon);