diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-05-31 17:01:28 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-06-04 20:52:52 -0400 |
commit | 44531928b3512b143f6e3c958e49f99e827eb7de (patch) | |
tree | db3012312dc407991821a124a6652f4c347d1d15 /src/nvim/message.c | |
parent | 310a56d0a05deceea7df5a74f418f1df322ec9e1 (diff) | |
download | rneovim-44531928b3512b143f6e3c958e49f99e827eb7de.tar.gz rneovim-44531928b3512b143f6e3c958e49f99e827eb7de.tar.bz2 rneovim-44531928b3512b143f6e3c958e49f99e827eb7de.zip |
vim-patch:8.1.2018: using freed memory when out of memory and displaying message
Problem: Using freed memory when out of memory and displaying message.
Solution: Make a copy of the message first.
https://github.com/vim/vim/commit/e5fbd7393067c279860598ac8359d1617b1082b9
Diffstat (limited to 'src/nvim/message.c')
-rw-r--r-- | src/nvim/message.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c index 9aa588e035..8999365d32 100644 --- a/src/nvim/message.c +++ b/src/nvim/message.c @@ -306,11 +306,6 @@ bool msg_attr_keep(char_u *s, int attr, bool keep, bool multiline) add_msg_hist((const char *)s, -1, attr, multiline); } - /* When displaying keep_msg, don't let msg_start() free it, caller must do - * that. */ - if (s == keep_msg) - keep_msg = NULL; - /* Truncate the message if needed. */ msg_start(); buf = msg_strtrunc(s, FALSE); |