diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-12-30 20:42:39 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-12-30 20:42:39 +0100 |
commit | 08b28b7ad52d5ee3cb5fa5982b647e325a410484 (patch) | |
tree | f9bba83c342b51db81766d17d63d26360bbefd6d | |
parent | e7538ae997b3983d0c91a886a74ebacedd752164 (diff) | |
download | vim-git-08b28b7ad52d5ee3cb5fa5982b647e325a410484.tar.gz |
patch 8.2.0063: wrong size argument to vim_snprintf()v8.2.0063
Problem: Wrong size argument to vim_snprintf(). (Dominique Pelle)
Solution: Reduce the size by the length. (related to #5410)
-rw-r--r-- | src/ops.c | 6 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -3813,8 +3813,12 @@ cursor_pos_info(dict_T *dict) bom_count = bomb_size(); if (dict == NULL && bom_count > 0) - vim_snprintf((char *)IObuff + STRLEN(IObuff), IOSIZE, + { + size_t len = STRLEN(IObuff); + + vim_snprintf((char *)IObuff + len, IOSIZE - len, _("(+%lld for BOM)"), (long_long_T)bom_count); + } if (dict == NULL) { // Don't shorten this message, the user asked for it. diff --git a/src/version.c b/src/version.c index d40cb3b4d..79f9f7c9c 100644 --- a/src/version.c +++ b/src/version.c @@ -743,6 +743,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 63, +/**/ 62, /**/ 61, |