diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-01-23 21:50:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-23 21:50:41 +0100 |
commit | 5892aab1b54b115cc3e74cb0ac59b0034627bf4e (patch) | |
tree | 974ccd5d14bb258403f3ec274ac93e8dfd651ca6 /src/nvim/fileio.c | |
parent | d4b931deacf61528e902623d38d0f4d314bc1839 (diff) | |
parent | b70a5cdd49ecd5f3fe749c1c66a169fee828c66e (diff) | |
download | rneovim-5892aab1b54b115cc3e74cb0ac59b0034627bf4e.tar.gz rneovim-5892aab1b54b115cc3e74cb0ac59b0034627bf4e.tar.bz2 rneovim-5892aab1b54b115cc3e74cb0ac59b0034627bf4e.zip |
Merge #5996 from justinmk/coverity-133845
xstrlcat() + coverity fixes
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r-- | src/nvim/fileio.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index 71af89b70d..d433afab3e 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -4982,8 +4982,8 @@ buf_check_timestamp ( set_vim_var_string(VV_WARNINGMSG, tbuf, -1); if (can_reload) { if (*mesg2 != NUL) { - strncat(tbuf, "\n", tbuf_len - 1); - strncat(tbuf, mesg2, tbuf_len - 1); + xstrlcat(tbuf, "\n", tbuf_len - 1); + xstrlcat(tbuf, mesg2, tbuf_len - 1); } if (do_dialog(VIM_WARNING, (char_u *) _("Warning"), (char_u *) tbuf, (char_u *) _("&OK\n&Load File"), 1, NULL, true) == 2) { @@ -4991,8 +4991,8 @@ buf_check_timestamp ( } } else if (State > NORMAL_BUSY || (State & CMDLINE) || already_warned) { if (*mesg2 != NUL) { - strncat(tbuf, "; ", tbuf_len); - strncat(tbuf, mesg2, tbuf_len); + xstrlcat(tbuf, "; ", tbuf_len - 1); + xstrlcat(tbuf, mesg2, tbuf_len - 1); } EMSG(tbuf); retval = 2; |