Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Salter <msalter@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: Fix error check in remote_read_bytes
Date: Tue, 23 Jul 2002 11:39:00 -0000	[thread overview]
Message-ID: <200207231510.g6NFAYR28959@deneb.localdomain> (raw)


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.  */


             reply	other threads:[~2002-07-23 15:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-23 11:39 Mark Salter [this message]
2002-07-23 12:11 ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200207231510.g6NFAYR28959@deneb.localdomain \
    --to=msalter@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox