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/getchar.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/getchar.c')
-rw-r--r-- | src/nvim/getchar.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index b0e5a20506..57b0cf9a31 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -266,7 +266,7 @@ add_buff ( ssize_t len; if (buf->bh_space >= (int)slen) { len = STRLEN(buf->bh_curr->b_str); - vim_strncpy(buf->bh_curr->b_str + len, s, (size_t)slen); + STRLCPY(buf->bh_curr->b_str + len, s, slen + 1); buf->bh_space -= slen; } else { if (slen < MINIMAL_SIZE) @@ -275,7 +275,7 @@ add_buff ( len = slen; buffblock_T *p = xmalloc(sizeof(buffblock_T) + len); buf->bh_space = (int)(len - slen); - vim_strncpy(p->b_str, s, (size_t)slen); + STRLCPY(p->b_str, s, slen + 1); p->b_next = buf->bh_curr->b_next; buf->bh_curr->b_next = p; |