2015-07-14 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/66861
* io/unix.c (compare_file_filename): Verify that u->filename is
non-NULL before strcmp.
(find_file0): Likewise.
From-SVN: r225788
+2015-07-14 Janne Blomqvist <jb@gcc.gnu.org>
+
+ PR libfortran/66861
+ * io/unix.c (compare_file_filename): Verify that u->filename is
+ non-NULL before strcmp.
+ (find_file0): Likewise.
+
2015-07-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR libfortran/40267
goto done;
}
# endif
- ret = (strcmp(path, u->filename) == 0);
+ if (u->filename)
+ ret = (strcmp(path, u->filename) == 0);
+ else
+ ret = 0;
#endif
done:
free (path);
}
else
# endif
- if (strcmp (u->filename, path) == 0)
+ if (u->filename && strcmp (u->filename, path) == 0)
return u;
#endif