]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/47296 (I/O Segfault when running out of file descriptors)
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Sat, 15 Jan 2011 06:42:30 +0000 (06:42 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Sat, 15 Jan 2011 06:42:30 +0000 (06:42 +0000)
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

libgfortran/ChangeLog
libgfortran/io/unix.c

index 6f116bd969eb554c017baef12ad9d7aaa7bc502b..4c2d185f91ddce2a651079643f43318c23f1e1af 100644 (file)
@@ -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
index a384f7bcc37d89e46c7553b6902fbb54112da1a0..e66560f5839b1c5ea75c9209b0cd74836e193a6b 100644 (file)
@@ -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;