mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 16:28:17 +00:00
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.
e5fbd73930
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user