* fhandler_disk_file.cc (__DIR_mounts::eval_ino): Make fname big enough

to allow multibyte chars.
This commit is contained in:
Corinna Vinschen 2007-10-19 12:22:49 +00:00
parent f3257492c4
commit 6788155fe2
2 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -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))