summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/w32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/w32.c b/src/w32.c
index 36a5a37496e..d7a91692c63 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -3918,7 +3918,7 @@ logon_network_drive (const char *path)
return;
n_slashes = 2;
- strncpy (share, path, MAX_UTF8_PATH);
+ strncpy (share, path, MAX_UTF8_PATH - 1);
/* Truncate to just server and share name. */
for (p = share + 2; *p && p < share + MAX_UTF8_PATH; p++)
{