From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7320 invoked by alias); 13 Jan 2004 20:00:11 -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 7304 invoked from network); 13 Jan 2004 20:00:09 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 13 Jan 2004 20:00:09 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id i0DK08g09888 for ; Tue, 13 Jan 2004 15:00:09 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i0DJxrM05664; Tue, 13 Jan 2004 14:59:53 -0500 Received: from redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id i0DJxpO11096; Tue, 13 Jan 2004 11:59:52 -0800 Message-ID: <40044E37.8090007@redhat.com> Date: Tue, 13 Jan 2004 20:00:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 MIME-Version: 1.0 To: Joern Rennecke CC: amylaar@fairadsl.co.uk, andrew.stubbs@superh.com, gdb-patches@sources.redhat.com, Elena Zannoni Subject: [OB] fix array size in sh-dis.c References: <200401091319.i09DJ7511867@linsvr1.uk.superh.com> In-Reply-To: <200401091319.i09DJ7511867@linsvr1.uk.superh.com> Content-Type: multipart/mixed; boundary="------------080705080609020404010901" X-SW-Source: 2004-01/txt/msg00351.txt.bz2 This is a multi-part message in MIME format. --------------080705080609020404010901 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 155 This array needs to be four bytes, in case we have to disassemble a four byte insn (eg. ppi). Otherwise, it clobbers one of the nearby local variables. --------------080705080609020404010901 Content-Type: text/plain; name="insn" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="insn" Content-length: 841 2004-01-13 Michael Snyder * sh-dis.c (print_insn_sh): Allocate 4 bytes for insn. Index: sh-dis.c =================================================================== RCS file: /cvs/src/src/opcodes/sh-dis.c,v retrieving revision 1.17 diff -p -r1.17 sh-dis.c *** sh-dis.c 5 Dec 2003 02:02:32 -0000 1.17 --- sh-dis.c 13 Jan 2004 19:56:21 -0000 *************** print_insn_sh (memaddr, info) *** 397,403 **** { fprintf_ftype fprintf_fn = info->fprintf_func; void *stream = info->stream; ! unsigned char insn[2]; unsigned char nibs[4]; int status; bfd_vma relmask = ~(bfd_vma) 0; --- 397,403 ---- { fprintf_ftype fprintf_fn = info->fprintf_func; void *stream = info->stream; ! unsigned char insn[4]; unsigned char nibs[4]; int status; bfd_vma relmask = ~(bfd_vma) 0; --------------080705080609020404010901--