coverity/155512: Pass correct length to strncat()

This commit is contained in:
ZyX 2017-01-23 02:03:48 +03:00
parent 47a7d32563
commit 8bc2bffda9

View File

@ -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);
strncat(tbuf, mesg2, tbuf_len);
strncat(tbuf, "\n", tbuf_len - 1);
strncat(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) {