From 03a49a00ab2239e769c61592ea946d151ea95114 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 7 Feb 2006 15:49:08 +0000 Subject: * dtable.cc (handle_to_fn): Accomodate new argument order in call to sys_wcstombs. * fhandler_disk_file.cc (fhandler_disk_file::readdir): Call sys_wcstombs instead of just wcstombs to accomodate OEM codepages. * miscfuncs.cc (sys_wcstombs): Split len argument in source and target length. Always 0-terminate result in target string. * security.cc (lsa2wchar): Remove unused function. (lsa2str): Ditto. (get_lsa_srv_inf): Ditto. (get_logon_server): Accomodate new argument order in call to sys_wcstombs. (get_user_groups): Ditto. (get_user_local_groups): Ditto. (get_priv_list): Call sys_wcstombs directly instead of lsa2str. * uinfo.cc (cygheap_user::ontherange): Accomodate new argument order in call to sys_wcstombs. * winsup.h (sys_wcstombs): Change prototype to match new argument order. --- winsup/cygwin/fhandler_disk_file.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'winsup/cygwin/fhandler_disk_file.cc') diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index b187de58b..6edd010b6 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -1681,8 +1681,7 @@ fhandler_disk_file::readdir (DIR *dir, dirent *de) } } } - wcstombs (fname, FileName, buf->FileNameLength / 2); - fname[buf->FileNameLength / 2] = '\0'; + sys_wcstombs (fname, CYG_MAX_PATH - 1, FileName, buf->FileNameLength / 2); } if (!(res = readdir_helper (dir, de, RtlNtStatusToDosError (status), -- cgit v1.2.3