[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 4b87169: Avoid a compilation warning in w32.c
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master 4b87169: Avoid a compilation warning in w32.c |
Date: |
Fri, 23 Aug 2019 09:01:17 -0400 (EDT) |
branch: master
commit 4b87169d113a151e5d9d6cf7b0d7cb4fb1d3d2d7
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Avoid a compilation warning in w32.c
* src/w32.c (logon_network_drive): Avoid compilation warning
about strncpy arguments.
---
src/w32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/w32.c b/src/w32.c
index 36a5a37..d7a9169 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++)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 4b87169: Avoid a compilation warning in w32.c,
Eli Zaretskii <=