From: Daniel Jacobowitz Date: Sun, 17 Feb 2008 15:26:17 +0000 (+0000) Subject: * server.c (handle_query): Correct length check. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d41b6bb462f94453ea71d80fe8f182981a7babc7;p=binutils-gdb.git * server.c (handle_query): Correct length check. --- diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 22563e5c405..6ec1704c41e 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,7 @@ +2008-02-17 Daniel Jacobowitz + + * server.c (handle_query): Correct length check. + 2008-02-14 Pedro Alves * win32-low.c (do_initial_child_stuff): Add process handle diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index bcb440c21fd..79bde643bdc 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);