aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2011-01-15 06:42:30 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2011-01-15 06:42:30 +0000
commit050d1a59d1568b0dc701a5a48409c847e26d4ee1 (patch)
treebf0a1297f7d44cf67e42bd1ae06249f77146ab0c /libgfortran
parent7c3e9502c3c6de7eeb2a1e7a95a0f485a42e067f (diff)
downloadgcc-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')
-rw-r--r--libgfortran/ChangeLog6
-rw-r--r--libgfortran/io/unix.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 6f116bd..4c2d185 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2011-01-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/47154
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;