* path.cc (fillout_mntent): Fix calculation of unicode buffer size.
This commit is contained in:
parent
349fba0cb4
commit
5ede1e7109
@ -1,3 +1,7 @@
|
|||||||
|
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>
|
2007-08-10 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* syscalls.cc (rename): Check oldpath and newpath for trailing dir
|
* syscalls.cc (rename): Check oldpath and newpath for trailing dir
|
||||||
|
@ -2625,7 +2625,8 @@ fillout_mntent (const char *native_path, const char *posix_path, unsigned flags)
|
|||||||
|
|
||||||
fs_info mntinfo;
|
fs_info mntinfo;
|
||||||
UNICODE_STRING unat;
|
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);
|
RtlInitEmptyUnicodeString (&unat, (PWSTR) alloca (size), size);
|
||||||
get_nt_native_path (native_path, unat);
|
get_nt_native_path (native_path, unat);
|
||||||
mntinfo.update (&unat, true); /* this pulls from a cache, usually. */
|
mntinfo.update (&unat, true); /* this pulls from a cache, usually. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user