diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2011-01-15 06:42:30 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2011-01-15 06:42:30 +0000 |
commit | 050d1a59d1568b0dc701a5a48409c847e26d4ee1 (patch) | |
tree | bf0a1297f7d44cf67e42bd1ae06249f77146ab0c /libgfortran/io/unix.c | |
parent | 7c3e9502c3c6de7eeb2a1e7a95a0f485a42e067f (diff) | |
download | gcc-050d1a59d1568b0dc701a5a48409c847e26d4ee1.zip gcc-050d1a59d1568b0dc701a5a48409c847e26d4ee1.tar.gz gcc-050d1a59d1568b0dc701a5a48409c847e26d4ee1.tar.bz2 |
re PR fortran/47296 (I/O Segfault when running out of file descriptors)
2011-01-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/47296
* io/unix.c (unpack_filename): Return non-zero if the filename passed
in is NULL.
From-SVN: r168832
Diffstat (limited to 'libgfortran/io/unix.c')
-rw-r--r-- | libgfortran/io/unix.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c index a384f7b..e66560f 100644 --- a/libgfortran/io/unix.c +++ b/libgfortran/io/unix.c @@ -1000,6 +1000,8 @@ unit_to_fd (int unit) int unpack_filename (char *cstring, const char *fstring, int len) { + if (fstring == NULL) + return 1; len = fstrlen (fstring, len); if (len >= PATH_MAX) return 1; |