From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28790 invoked by alias); 23 Jul 2002 15:13:13 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 28644 invoked from network); 23 Jul 2002 15:13:10 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 23 Jul 2002 15:13:10 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g6NF1Zs12091 for ; Tue, 23 Jul 2002 11:01:35 -0400 Received: from deneb.localdomain (msalter.cipe.redhat.com [10.0.0.36]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g6NFD9R06111 for ; Tue, 23 Jul 2002 11:13:09 -0400 Received: (from msalter@localhost) by deneb.localdomain (8.11.6/8.11.6) id g6NFAYR28959; Tue, 23 Jul 2002 11:10:34 -0400 Date: Tue, 23 Jul 2002 11:39:00 -0000 Message-Id: <200207231510.g6NFAYR28959@deneb.localdomain> From: Mark Salter To: gdb-patches@sources.redhat.com Subject: Fix error check in remote_read_bytes X-SW-Source: 2002-07/txt/msg00458.txt.bz2 2002-07-23 Mark Salter * 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. */