summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/path.cc2
2 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index d75981f07..68a1e84de 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 9c33e53ae..3973a32af 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -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;
}