diff options
author | Christopher Faylor <me@cgf.cx> | 2003-06-04 22:59:55 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-06-04 22:59:55 +0000 |
commit | 7b17543fb209bf6a06f5a79905ec9de2e8684cd5 (patch) | |
tree | 506d843af1e796d9995639796627ad752445378e /winsup | |
parent | 2129f2833bef01c96bfb11a56e151846d7899847 (diff) | |
download | newlib-7b17543fb209bf6a06f5a79905ec9de2e8684cd5.zip newlib-7b17543fb209bf6a06f5a79905ec9de2e8684cd5.tar.gz newlib-7b17543fb209bf6a06f5a79905ec9de2e8684cd5.tar.bz2 |
* path.cc (conv_path_list): Use correct value when calculating length to avoid
a potential SEGV.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/path.cc | 2 |
2 files changed, 6 insertions, 1 deletions
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 <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 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; } |