Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Fix error check in remote_read_bytes
@ 2002-07-23 11:39 Mark Salter
  2002-07-23 12:11 ` Andrew Cagney
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Salter @ 2002-07-23 11:39 UTC (permalink / raw)
  To: gdb-patches


2002-07-23  Mark Salter  <msalter@redhat.com>

	* remote.c (remote_read_bytes): Fix check for error.


Index: remote.c
===================================================================
RCS file: /cvs/src/src/gdb/remote.c,v
retrieving revision 1.88
diff -u -p -5 -r1.88 remote.c
--- remote.c	11 Jul 2002 13:50:49 -0000	1.88
+++ remote.c	23 Jul 2002 15:10:11 -0000
@@ -3951,11 +3951,13 @@ remote_read_bytes (CORE_ADDR memaddr, ch
       *p = '\0';
 
       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
 	     representing errors (big enough to include errno codes, bfd_error
 	     codes, and others).  But for now just return EIO.  */


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-07-23 18:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-23 11:39 Fix error check in remote_read_bytes Mark Salter
2002-07-23 12:11 ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox