OSDN Git Service

* path.cc (conv_path_list): Use correct value when calculating length to avoid
authorcgf <cgf>
Wed, 4 Jun 2003 22:59:55 +0000 (22:59 +0000)
committercgf <cgf>
Wed, 4 Jun 2003 22:59:55 +0000 (22:59 +0000)
a potential SEGV.

winsup/cygwin/ChangeLog
winsup/cygwin/path.cc

index d75981f..68a1e84 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-04  Christopher Faylor  <cgf@redhat.com>
+
+       * path.cc (conv_path_list): Use correct value when calculating length
+       to avoid a potential SEGV.
+
 2003-06-03  Pierre Humblet  <pierre.humblet@ieee.org>
 
         * fhandler_disk_file.cc (fhandler_disk_file::fstat): Mark the pc
index 9c33e53..3973a32 100644 (file)
@@ -3551,7 +3551,7 @@ conv_path_list_buf_size (const char *path_list, bool to_posix)
   /* 100: slop */
   size = strlen (path_list)
     + (num_elms * max_mount_path_len)
-    + (nrel * strlen (to_posix ? pc.get_win32 () : pc.normalized_path))
+    + (nrel * strlen (to_posix ? pc.normalized_path : pc.get_win32 ()))
     + 100;
   return size;
 }