diff options
-rw-r--r-- | winsup/cygwin/ChangeLog | 4 | ||||
-rw-r--r-- | winsup/cygwin/path.cc | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 7b158b1eb..dcef6f846 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,9 @@ 2007-08-10 Corinna Vinschen <corinna@vinschen.de> + * path.cc (fillout_mntent): Fix calculation of unicode buffer size. + +2007-08-10 Corinna Vinschen <corinna@vinschen.de> + * syscalls.cc (rename): Check oldpath and newpath for trailing dir separators, require them to be existing directories if so. Check for a request to change only the case of the filename. Check paths diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 380029cf0..2374c1cb7 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -2625,7 +2625,8 @@ fillout_mntent (const char *native_path, const char *posix_path, unsigned flags) fs_info mntinfo; UNICODE_STRING unat; - size_t size = (strlen (native_path) + 1) * sizeof (WCHAR); + /* Size must allow prepending the native NT path prefixes. */ + size_t size = (strlen (native_path) + 10) * sizeof (WCHAR); RtlInitEmptyUnicodeString (&unat, (PWSTR) alloca (size), size); get_nt_native_path (native_path, unat); mntinfo.update (&unat, true); /* this pulls from a cache, usually. */ |