From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10974 invoked by alias); 6 Jul 2006 04:46:04 -0000 Received: (qmail 10965 invoked by uid 22791); 6 Jul 2006 04:46:03 -0000 X-Spam-Check-By: sourceware.org Received: from nile.gnat.com (HELO nile.gnat.com) (205.232.38.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 06 Jul 2006 04:46:01 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-nile.gnat.com (Postfix) with ESMTP id F419A48CE43; Thu, 6 Jul 2006 00:45:58 -0400 (EDT) Received: from nile.gnat.com ([127.0.0.1]) by localhost (nile.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 06099-02-8; Thu, 6 Jul 2006 00:45:58 -0400 (EDT) Received: from takamaka.act-europe.fr (S0106000625ac85e1.vs.shawcable.net [70.71.27.110]) by nile.gnat.com (Postfix) with ESMTP id 7AC2A48CE42; Thu, 6 Jul 2006 00:45:58 -0400 (EDT) Received: by takamaka.act-europe.fr (Postfix, from userid 507) id A3AE647E7F; Wed, 5 Jul 2006 21:45:57 -0700 (PDT) Date: Thu, 06 Jul 2006 04:46:00 -0000 From: Joel Brobecker To: Eli Zaretskii Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] New substitute-path commands Message-ID: <20060706044557.GB673@adacore.com> References: <20060705215606.GF3580@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-07/txt/msg00024.txt.bz2 > > + new_path = (char *) malloc (strlen (path) + 1 > > + + strlen (substitute_path_to) > > + - strlen (substitute_path_from)); > > + strncpy (new_path, path, from_start - path); > > Why did you use malloc instead of xmalloc here? Because I didn't pay attention ? That was an oversight on my part. Good catch, thanks. -- Joel