On 03/13/2016 01:15 AM, Bernhard Reutner-Fischer wrote:
> On March 13, 2016 3:22:53 AM GMT+01:00, Jerry DeLisle <jvdeli...@charter.net> 
> wrote:
>> I plan to commit the attached patch and test case under simple and
>> obvious tomorrow.
> 
> First, the patch adds superfluous vertical whitespace.
> 
> Second, and I apologise for stating the obvious, I'd make that a whitelist 
> instead, I.e only allow regular files or symlinks pointing to regular files 
> as I think there are no sensible use cases for including e.g. block- or char 
> devices et al. Including a pipe would maybe be possible to support but I 
> doubt this is a usual usage pattern.
> 
> Thanks,
> 
> 

Thanks for your thought.

Done, tested with a link to a regular file, changed the error message just a 
bit.

New Revision: 234169

URL: https://gcc.gnu.org/viewcvs?rev=234169&root=gcc&view=rev
Log:
2016-03-13  Jerry DeLisle  <jvdeli...@gcc.gnu.org>
            Jim MacArthur  <jim.macart...@codethink.co.uk>

        PR fortran/69043
        * scanner.c (load_file): Check that included file is regular.

        PR fortran/69043
        * gfortran.dg/include_9.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/include_9.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/scanner.c
    trunk/gcc/testsuite/ChangeLog

Reply via email to