aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/file_search.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2014-06-13 18:09:08 -0400
committerJustin M. Keyes <justinkz@gmail.com>2014-06-13 18:09:08 -0400
commit8bbeb4b480a72d0099a18c4d8200313600045231 (patch)
treecf153eceb121aef15e50631282e9171a24b74406 /src/nvim/file_search.c
parent5b3b3fd3ed4372866730ae857e8c09d6e5d1167d (diff)
parentd430f039d1255eaab55470b5613d83c24d030a64 (diff)
downloadrneovim-8bbeb4b480a72d0099a18c4d8200313600045231.tar.gz
rneovim-8bbeb4b480a72d0099a18c4d8200313600045231.tar.bz2
rneovim-8bbeb4b480a72d0099a18c4d8200313600045231.zip
Merge #743 'Replace vim_strncpy with strlcpy'
Diffstat (limited to 'src/nvim/file_search.c')
-rw-r--r--src/nvim/file_search.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/file_search.c b/src/nvim/file_search.c
index 2e6cc616e5..f6a052255b 100644
--- a/src/nvim/file_search.c
+++ b/src/nvim/file_search.c
@@ -307,7 +307,7 @@ vim_findfile_init (
if (!vim_isAbsName(rel_fname) && len + 1 < MAXPATHL) {
/* Make the start dir an absolute path name. */
- vim_strncpy(ff_expand_buffer, rel_fname, len);
+ STRLCPY(ff_expand_buffer, rel_fname, len + 1);
search_ctx->ffsc_start_dir = FullName_save(ff_expand_buffer, FALSE);
} else
search_ctx->ffsc_start_dir = vim_strnsave(rel_fname, len);
@@ -1092,7 +1092,7 @@ static int ff_check_visited(ff_visited_T **visited_list, char_u *fname, char_u *
// For a URL we only compare the name, otherwise we compare the
// device/inode.
if (path_with_url(fname)) {
- vim_strncpy(ff_expand_buffer, fname, MAXPATHL - 1);
+ STRLCPY(ff_expand_buffer, fname, MAXPATHL);
url = true;
} else {
ff_expand_buffer[0] = NUL;