From 7b17543fb209bf6a06f5a79905ec9de2e8684cd5 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Wed, 4 Jun 2003 22:59:55 +0000 Subject: * path.cc (conv_path_list): Use correct value when calculating length to avoid a potential SEGV. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/path.cc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin') diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index d75981f..68a1e84 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2003-06-04 Christopher Faylor + + * path.cc (conv_path_list): Use correct value when calculating length + to avoid a potential SEGV. + 2003-06-03 Pierre Humblet * fhandler_disk_file.cc (fhandler_disk_file::fstat): Mark the pc diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 9c33e53..3973a32 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; } -- cgit v1.1