This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PR libfortran/62768] Handle filenames with embedded nulls
- From: Janne Blomqvist <blomqvist dot janne at gmail dot com>
- To: Hans-Peter Nilsson <hp at bitrange dot com>
- Cc: FX <fxcoudert at gmail dot com>, Fortran List <fortran at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 18 Sep 2014 00:47:59 +0300
- Subject: Re: [PR libfortran/62768] Handle filenames with embedded nulls
- Authentication-results: sourceware.org; auth=none
- References: <CAO9iq9E75dJ2AEMfnB_Ro68FBEpYz=BjS2-fxqWNUznbCtpH+Q at mail dot gmail dot com> <CAO9iq9GP7x_sYFAzRYZryw8LEJxSBY_nrXcHHQG+BQPGJTFcZQ at mail dot gmail dot com> <F7035948-4928-4A65-90DF-1B12D7316FEB at gmail dot com> <CAO9iq9EENvbr-BSEOPZeV9325xn8=GX02z8y46_6cvHvL9-weg at mail dot gmail dot com> <alpine dot BSF dot 2 dot 02 dot 1409170720140 dot 97960 at arjuna dot pair dot com> <CAO9iq9H2ApQJP-k0a3A-MOGGqPvaGNd1UMhBy2NahfUTGnKNqw at mail dot gmail dot com> <alpine dot BSF dot 2 dot 02 dot 1409171203330 dot 89896 at arjuna dot pair dot com> <alpine dot BSF dot 2 dot 02 dot 1409171424450 dot 96402 at arjuna dot pair dot com> <alpine dot BSF dot 2 dot 02 dot 1409171634100 dot 96402 at arjuna dot pair dot com>
On Wed, Sep 17, 2014 at 11:36 PM, Hans-Peter Nilsson <hp@bitrange.com> wrote:
> On Wed, 17 Sep 2014, Hans-Peter Nilsson wrote:
>> On Wed, 17 Sep 2014, Hans-Peter Nilsson wrote:
>> > On Wed, 17 Sep 2014, Janne Blomqvist wrote:
>> > > Oops, I forgot to update some parts in an #ifdef branch that isn't
>> > > taken on my target. I'll try to find time to fix it later tonight. If
>> > > you're in a hurry, just replace
>> > >
>> > > fstrcpy (iqp->name, iqp->name_len, u->file, u->file_len);
>> > >
>> > > with
>> > >
>> > > cf_strcpy (iqp->name, iqp->name_len, u->filename);
>> > >
>> > > in inquire.c.
>> >
>> > Thanks, build completes and I'll commit the following as obvious
>> > if there are no regressions.
>>
>> Since there are 25 related regressions, not committed.
>> There must be something else amiss too.
>
> On the other hand, the tree *is* broken for some ports; I'd
> prefer regressions to that. So, unless you're onto this, how do
> you feel about me committing the posted patch and opening a PR
> for the regressions?
I committed
Index: inquire.c
===================================================================
--- inquire.c (revision 215337)
+++ inquire.c (working copy)
@@ -92,9 +92,9 @@ inquire_via_unit (st_parameter_inquire *
else if (u->unit_number == options.stderr_unit)
fstrcpy (iqp->name, iqp->name_len, "CONERR$", sizeof("CONERR$"));
else
- fstrcpy (iqp->name, iqp->name_len, u->file, u->file_len);
+ cf_strcpy (iqp->name, iqp->name_len, u->filename);
#else
- fstrcpy (iqp->name, iqp->name_len, u->file, u->file_len);
+ cf_strcpy (iqp->name, iqp->name_len, u->filename);
#endif
}
as obvious (r215338).
--
Janne Blomqvist