vim-patch:8.2.0063: wrong size argument to vim_snprintf()

Problem:    Wrong size argument to vim_snprintf(). (Dominique Pelle)
Solution:   Reduce the size by the length. (related to vim/vim#5410)
08b28b7ad5
This commit is contained in:
Jan Edmund Lazo 2019-12-30 16:55:46 -05:00
parent 0e7baed219
commit eeabd3a8c6
No known key found for this signature in database
GPG Key ID: 64915E6E9F735B15
1 changed files with 2 additions and 1 deletions

View File

@ -5654,7 +5654,8 @@ void cursor_pos_info(dict_T *dict)
bom_count = bomb_size();
if (dict == NULL && bom_count > 0) {
vim_snprintf((char *)IObuff + STRLEN(IObuff), IOSIZE - STRLEN(IObuff),
const size_t len = STRLEN(IObuff);
vim_snprintf((char *)IObuff + len, IOSIZE - len,
_("(+%" PRId64 " for BOM)"), (int64_t)bom_count);
}
if (dict == NULL) {