summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/path.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc3
1 files changed, 2 insertions, 1 deletions
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. */