OSDN Git Service

2011-01-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 15 Jan 2011 06:42:30 +0000 (06:42 +0000)
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 15 Jan 2011 06:42:30 +0000 (06:42 +0000)
PR libgfortran/47296
* io/unix.c (unpack_filename): Return non-zero if the filename passed
in is NULL.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168832 138bc75d-0d04-0410-961f-82ee72b054a4

libgfortran/ChangeLog
libgfortran/io/unix.c

index 6f116bd..4c2d185 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 a384f7b..e66560f 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;