From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27247 invoked by alias); 7 Aug 2014 01:52:10 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 24966 invoked by uid 89); 7 Aug 2014 01:52:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-pa0-f44.google.com Received: from mail-pa0-f44.google.com (HELO mail-pa0-f44.google.com) (209.85.220.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 07 Aug 2014 01:52:02 +0000 Received: by mail-pa0-f44.google.com with SMTP id eu11so4458882pac.31 for ; Wed, 06 Aug 2014 18:52:00 -0700 (PDT) X-Received: by 10.66.236.6 with SMTP id uq6mr14646655pac.24.1407376319991; Wed, 06 Aug 2014 18:51:59 -0700 (PDT) Received: from bubble.grove.modra.org (CPE-58-160-155-134.oycza5.sa.bigpond.net.au. [58.160.155.134]) by mx.google.com with ESMTPSA id ra2sm2577575pbc.71.2014.08.06.18.51.57 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 06 Aug 2014 18:51:59 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 0C7A2EA33E5; Thu, 7 Aug 2014 11:21:54 +0930 (CST) Date: Thu, 07 Aug 2014 01:52:00 -0000 From: Alan Modra To: Chen Gang Cc: hjl.tools@gmail.com, nickc@redhat.com, binutils@sourceware.org, gdb-patches@sourceware.org Subject: Re: [PATCH] bfd/coff-ppc.c: Be sure of zero terminated string after copy from '_n_name' Message-ID: <20140807015153.GV8921@bubble.grove.modra.org> Mail-Followup-To: Chen Gang , hjl.tools@gmail.com, nickc@redhat.com, binutils@sourceware.org, gdb-patches@sourceware.org References: <53E24F3F.2050701@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53E24F3F.2050701@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-08/txt/msg00126.txt.bz2 On Wed, Aug 06, 2014 at 11:52:31PM +0800, Chen Gang wrote: > '_n_name' may not be zero terminated string, and it may copy to 'name' > or 'my_name' which are assumed that must be zero terminated string. So > during copy operation, need be sure of them zero terminated. > > Also remove the usless asignment to 'name'. > > 2014-08-06 Chen Gang > > * coff-ppc.c (coff_ppc_relocate_section): Be sure of zero > terminatedstring after copy from '_n_name'. This is OK. -- Alan Modra Australia Development Lab, IBM