From 66504d44b96283186cf2a489e6995c222fb81f60 Mon Sep 17 00:00:00 2001 From: Mark Salter Date: Tue, 23 Jul 2002 18:55:06 +0000 Subject: [PATCH] Fix error check in remote_read_bytes --- gdb/ChangeLog | 4 ++++ gdb/remote.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9d6f45a19f2..dbad2a0654c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2002-07-23 Mark Salter + + * remote.c (remote_read_bytes): Fix check for error. + 2002-07-22 Kevin Buettner * aix-thread.c (language.h): Include. diff --git a/gdb/remote.c b/gdb/remote.c index 1758d17005f..dde6fb00ec1 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -3953,7 +3953,9 @@ remote_read_bytes (CORE_ADDR memaddr, char *myaddr, int len) putpkt (buf); getpkt (buf, sizeof_buf, 0); - if (buf[0] == 'E') + if (buf[0] == 'E' + && isxdigit (buf[1]) && isxdigit (buf[2]) + && buf[3] == '\0') { /* There is no correspondance between what the remote protocol uses for errors and errno codes. We would like a cleaner way of -- 2.30.2