aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-09-13 19:31:56 -0400
committerJustin M. Keyes <justinkz@gmail.com>2019-09-13 16:31:56 -0700
commit4cee0e0731ecac797465f112be2c0b803b654aec (patch)
tree68afc4ad7180e16ae66e82f19b7df70ff0b01423 /src
parent5a3c86205fb46505ff22cd50eb5de48e1a95c4e6 (diff)
downloadrneovim-4cee0e0731ecac797465f112be2c0b803b654aec.tar.gz
rneovim-4cee0e0731ecac797465f112be2c0b803b654aec.tar.bz2
rneovim-4cee0e0731ecac797465f112be2c0b803b654aec.zip
vim-patch:8.1.2026: possibly using uninitialized memory #11013
Problem: Possibly using uninitialized memory. Solution: Check if "dict" is NULL. (closes vim/vim#4925) https://github.com/vim/vim/commit/dbec74907eb614517bcf27116d5aad32e087f241
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index bfd02d4ff1..898501e6dd 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -5577,11 +5577,12 @@ void 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 - STRLEN(IObuff),
_("(+%" PRId64 " for BOM)"), (int64_t)bom_count);
}
if (dict == NULL) {
+ // Don't shorten this message, the user asked for it.
p = p_shm;
p_shm = (char_u *)"";
msg(IObuff);