From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17071 invoked by alias); 6 Jul 2006 03:31:08 -0000 Received: (qmail 17062 invoked by uid 22791); 6 Jul 2006 03:31:07 -0000 X-Spam-Check-By: sourceware.org Received: from nitzan.inter.net.il (HELO nitzan.inter.net.il) (192.114.186.20) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 06 Jul 2006 03:31:06 +0000 Received: from HOME-C4E4A596F7 (IGLD-83-130-250-49.inter.net.il [83.130.250.49]) by nitzan.inter.net.il (MOS 3.7.3-GA) with ESMTP id EAJ69108 (AUTH halo1); Thu, 6 Jul 2006 06:31:01 +0300 (IDT) Date: Thu, 06 Jul 2006 03:31:00 -0000 Message-Id: From: Eli Zaretskii To: Joel Brobecker CC: gdb-patches@sources.redhat.com In-reply-to: <20060705215606.GF3580@adacore.com> (message from Joel Brobecker on Wed, 5 Jul 2006 14:56:06 -0700) Subject: Re: [RFA] New substitute-path commands Reply-to: Eli Zaretskii References: <20060705215606.GF3580@adacore.com> X-IsSubscribed: yes 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/msg00023.txt.bz2 > Date: Wed, 5 Jul 2006 14:56:06 -0700 > From: Joel Brobecker > > + 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?