mirror of
https://github.com/neovim/neovim.git
synced 2025-09-05 19:08:15 +00:00
vim-patch:9.1.1021: string might be used without a trailing NUL (#32062)
Problem: string might be used without a trailing NUL (after v9.1.0997)
Solution: Make sure that the buffer is NUL terminated
closes: vim/vim#16457
70dfc374ec
Co-authored-by: John Marriott <basilisk@internode.on.net>
This commit is contained in:
@@ -103,7 +103,8 @@ void win_redr_status(win_T *wp)
|
||||
|| bufIsChanged(wp->w_buffer)
|
||||
|| wp->w_buffer->b_p_ro)
|
||||
&& plen < MAXPATHL - 1) {
|
||||
*(p + plen++) = ' ';
|
||||
*(p + plen++) = ' '; // replace NUL with space
|
||||
*(p + plen) = NUL; // NUL terminate the string
|
||||
}
|
||||
if (bt_help(wp->w_buffer)) {
|
||||
plen += snprintf(p + plen, MAXPATHL - (size_t)plen, "%s", _("[Help]"));
|
||||
|
Reference in New Issue
Block a user