diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2007-10-19 16:22:49 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2007-10-19 16:22:49 +0400 |
commit | 6788155fe224ee455c0ab5b33b602b954a50b766 (patch) | |
tree | 6825fd83d8ef93b72f93ae3e932e88eaae41709a /winsup | |
parent | f3257492c47c8fa3b9c4bd25f016e037d2908116 (diff) |
* fhandler_disk_file.cc (__DIR_mounts::eval_ino): Make fname big enough
to allow multibyte chars.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_disk_file.cc | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index ba8c902a1..a6a26e72c 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2007-10-19 Corinna Vinschen <corinna@vinschen.de> + + * fhandler_disk_file.cc (__DIR_mounts::eval_ino): Make fname big enough + to allow multibyte chars. + 2007-10-18 Corinna Vinschen <corinna@vinschen.de> * fhandler.cc (fhandler_base::open): Open native symlinks with diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 051ad77aa..3ce09f093 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -49,13 +49,13 @@ class __DIR_mounts __ino64_t eval_ino (int idx) { __ino64_t ino = 0; - char fname[parent_dir_len + mounts[idx].Length / sizeof (WCHAR) + 2]; + char fname[parent_dir_len + mounts[idx].Length + 2]; struct __stat64 st; char *c = stpcpy (fname, parent_dir); if (c[- 1] != '/') *c++ = '/'; - sys_wcstombs (c, mounts[idx].Length / sizeof (WCHAR) + 1, + sys_wcstombs (c, mounts[idx].Length + 1, mounts[idx].Buffer, mounts[idx].Length / sizeof (WCHAR)); path_conv pc (fname, PC_SYM_NOFOLLOW | PC_POSIX); if (!stat_worker (pc, &st)) |