Fix error check in remote_read_bytes

This commit is contained in:
Mark Salter 2002-07-23 18:55:06 +00:00
parent 4455705d76
commit 66504d44b9
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2002-07-23 Mark Salter <msalter@redhat.com>
* remote.c (remote_read_bytes): Fix check for error.
2002-07-22 Kevin Buettner <kevinb@redhat.com>
* aix-thread.c (language.h): Include.

View File

@ -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