This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] New substitute-path commands
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Wed, 5 Jul 2006 21:45:57 -0700
- Subject: Re: [RFA] New substitute-path commands
- References: <20060705215606.GF3580@adacore.com> <u64ibquiw.fsf@gnu.org>
> > + 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