diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-12-30 16:55:46 -0500 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-12-30 17:02:15 -0500 |
commit | eeabd3a8c6e904bf3e01017b60336c0063356943 (patch) | |
tree | 392760a98bcf3147819194918d0bf3049427ae6d | |
parent | 0e7baed2195fec8e99df69112e464791c02b2555 (diff) | |
download | rneovim-eeabd3a8c6e904bf3e01017b60336c0063356943.tar.gz rneovim-eeabd3a8c6e904bf3e01017b60336c0063356943.tar.bz2 rneovim-eeabd3a8c6e904bf3e01017b60336c0063356943.zip |
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)
https://github.com/vim/vim/commit/08b28b7ad52d5ee3cb5fa5982b647e325a410484
-rw-r--r-- | src/nvim/ops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c index b597c5b214..6a621cdaa6 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -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) { |