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/ex_getln.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/ex_getln.c')
| -rw-r--r-- | src/nvim/ex_getln.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index 0b00e458ff..994b2f510f 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -3372,7 +3372,7 @@ addstar ( } else { retval = xmalloc(len + 4); if (retval != NULL) { - vim_strncpy(retval, fname, len); + STRLCPY(retval, fname, len + 1); /* * Don't add a star to *, ~, ~user, $var or `cmd`. @@ -3896,10 +3896,10 @@ expand_shellcmd ( l = e - s; if (l > MAXPATHL - 5) break; - vim_strncpy(buf, s, l); + STRLCPY(buf, s, l + 1); add_pathsep(buf); l = STRLEN(buf); - vim_strncpy(buf + l, pat, MAXPATHL - 1 - l); + STRLCPY(buf + l, pat, MAXPATHL - l); /* Expand matches in one directory of $PATH. */ ret = expand_wildcards(1, &buf, num_file, file, flags); |