PR libfortran/64770 Segfault when trying to open existing file with status="new".
authorJanne Blomqvist <jb@gcc.gnu.org>
Sat, 24 Jan 2015 21:52:34 +0000 (23:52 +0200)
committerJanne Blomqvist <jb@gcc.gnu.org>
Sat, 24 Jan 2015 21:52:34 +0000 (23:52 +0200)
commit7165d8f1916979828be6e913a2a0d19d2923ffd0
tree0c3d1d607e4cba288e848924dd2fb81811380302
parentd773ed85c56fbae24f13b4e4a054fcc7ca1550f7
PR libfortran/64770 Segfault when trying to open existing file with status="new".

libgfortran ChangeLog:

2015-01-24  Janne Blomqvist  <jb@gcc.gnu.org>

PR libfortran/64770
* io/unit.c (filename_from_unit): Check that u->filename != NULL
before calling strdup.

testsuite ChangeLog:

2015-01-24  Janne Blomqvist  <jb@gcc.gnu.org>

PR libfortran/64770
* gfortran.dg/open_new_segv.f90: New test.

From-SVN: r220086
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/open_new_segv.f90 [new file with mode: 0644]
libgfortran/ChangeLog
libgfortran/io/unit.c