* path.cc (conv_path_list): Use correct value when calculating length to avoid

a potential SEGV.
This commit is contained in:
Christopher Faylor 2003-06-04 22:59:55 +00:00
parent 2129f2833b
commit 7b17543fb2
2 changed files with 6 additions and 1 deletions

View 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

View 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;
}