mirror of
https://github.com/neovim/neovim.git
synced 2025-10-19 16:21:51 +00:00
coverity/331382: Allocate enough space for trailing NUL
This commit is contained in:
@@ -131,7 +131,7 @@ static int msg_grid_scroll_discount = 0;
|
|||||||
|
|
||||||
static void ui_ext_msg_set_pos(int row, bool scrolled)
|
static void ui_ext_msg_set_pos(int row, bool scrolled)
|
||||||
{
|
{
|
||||||
char buf[MAX_MCO];
|
char buf[MAX_MCO + 1];
|
||||||
size_t size = utf_char2bytes(curwin->w_p_fcs_chars.msgsep, (char_u *)buf);
|
size_t size = utf_char2bytes(curwin->w_p_fcs_chars.msgsep, (char_u *)buf);
|
||||||
buf[size] = '\0';
|
buf[size] = '\0';
|
||||||
ui_call_msg_set_pos(msg_grid.handle, row, scrolled,
|
ui_call_msg_set_pos(msg_grid.handle, row, scrolled,
|
||||||
|
Reference in New Issue
Block a user