This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch,libgfortran] Handle invalid command line in EXECUTE_COMMAND_LINE
- From: FX <fxcoudert at gmail dot com>
- To: Janne Blomqvist <blomqvist dot janne at gmail dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>
- Date: Sun, 23 Aug 2015 23:27:24 +0200
- Subject: Re: [patch,libgfortran] Handle invalid command line in EXECUTE_COMMAND_LINE
- Authentication-results: sourceware.org; auth=none
- References: <CB2ED162-D539-4244-B10D-D7356D5263BB at gmail dot com> <CAO9iq9GzMjckrE_CwmSPL88dijnrpLZGCH3PNvWDtCDq6BPQOg at mail dot gmail dot com>
> Otherwise looks good, but strncat is C99, and we support targets which
> don't have a C99 libc (been there, done that..). Since in this case
> you're dealing with string literals rather than user input, it ought
> to be safe to just use plain strcat (or strlen+memcpy, if you prefer).
Nope, strncat() is C90: http://clc-wiki.net/wiki/strncat
Thus, safe to use, I think. I committed as submitted, as revision 227105.
Thanks for the review.
FX