diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-06-13 18:09:08 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-06-13 18:09:08 -0400 |
commit | 8bbeb4b480a72d0099a18c4d8200313600045231 (patch) | |
tree | cf153eceb121aef15e50631282e9171a24b74406 /src/nvim/os_unix.c | |
parent | 5b3b3fd3ed4372866730ae857e8c09d6e5d1167d (diff) | |
parent | d430f039d1255eaab55470b5613d83c24d030a64 (diff) | |
download | rneovim-8bbeb4b480a72d0099a18c4d8200313600045231.tar.gz rneovim-8bbeb4b480a72d0099a18c4d8200313600045231.tar.bz2 rneovim-8bbeb4b480a72d0099a18c4d8200313600045231.zip |
Merge #743 'Replace vim_strncpy with strlcpy'
Diffstat (limited to 'src/nvim/os_unix.c')
-rw-r--r-- | src/nvim/os_unix.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/os_unix.c b/src/nvim/os_unix.c index 18838ddd41..946eaa62a2 100644 --- a/src/nvim/os_unix.c +++ b/src/nvim/os_unix.c @@ -409,9 +409,9 @@ int len /* buffer size, only used when name gets longer */ struct stat st2; /* Verify the inode is equal. */ - vim_strncpy(newname, name, MAXPATHL); - vim_strncpy(newname + (tail - name), (char_u *)dp->d_name, - MAXPATHL - (tail - name)); + STRLCPY(newname, name, MAXPATHL + 1); + STRLCPY(newname + (tail - name), dp->d_name, + MAXPATHL - (tail - name) + 1); if (lstat((char *)newname, &st2) >= 0 && st.st_ino == st2.st_ino && st.st_dev == st2.st_dev) { |