summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/path.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-06-04 22:59:55 +0000
committerChristopher Faylor <me@cgf.cx>2003-06-04 22:59:55 +0000
commit7b17543fb209bf6a06f5a79905ec9de2e8684cd5 (patch)
tree506d843af1e796d9995639796627ad752445378e /winsup/cygwin/path.cc
parent2129f2833bef01c96bfb11a56e151846d7899847 (diff)
downloadcygnal-7b17543fb209bf6a06f5a79905ec9de2e8684cd5.tar.gz
cygnal-7b17543fb209bf6a06f5a79905ec9de2e8684cd5.tar.bz2
cygnal-7b17543fb209bf6a06f5a79905ec9de2e8684cd5.zip
* path.cc (conv_path_list): Use correct value when calculating length to avoid
a potential SEGV.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc2
1 files changed, 1 insertions, 1 deletions
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;
}