diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-09-13 22:16:21 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-09-13 22:16:21 +0200 |
commit | dbec74907eb614517bcf27116d5aad32e087f241 (patch) | |
tree | 17209fd0c53e6344185dca416bfd590c89272981 | |
parent | 1946de140a84accaa2f298c7fdccc1be37b9f630 (diff) | |
download | vim-git-dbec74907eb614517bcf27116d5aad32e087f241.tar.gz |
patch 8.1.2026: possibly using uninitialized memoryv8.1.2026
Problem: Possibly using uninitialized memory.
Solution: Check if "dict" is NULL. (closes #4925)
-rw-r--r-- | src/ops.c | 4 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 4 insertions, 2 deletions
@@ -7074,12 +7074,12 @@ cursor_pos_info(dict_T *dict) } bom_count = bomb_size(); - if (bom_count > 0) + if (dict == NULL && bom_count > 0) vim_snprintf((char *)IObuff + STRLEN(IObuff), IOSIZE, _("(+%lld for BOM)"), (long_long_T)bom_count); if (dict == NULL) { - /* Don't shorten this message, the user asked for it. */ + // Don't shorten this message, the user asked for it. p = p_shm; p_shm = (char_u *)""; msg((char *)IObuff); diff --git a/src/version.c b/src/version.c index f412732ca..c15abcbbe 100644 --- a/src/version.c +++ b/src/version.c @@ -758,6 +758,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2026, +/**/ 2025, /**/ 2024, |