mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 09:26:30 +00:00
vim-patch:8.1.0404: accessing invalid memory with long argument name
Problem: Accessing invalid memory with long argument name.
Solution: Use item_count instead of checking for a terminating NULL.
(Dominique Pelle, closes vim/vim#3444)
e961cba3cb
This commit is contained in:
@@ -2063,7 +2063,7 @@ void list_in_columns(char_u **items, int size, int current)
|
||||
|
||||
if (Columns < width) {
|
||||
// Not enough screen columns - show one per line
|
||||
for (i = 0; items[i] != NULL; i++) {
|
||||
for (i = 0; i < item_count; i++) {
|
||||
version_msg_wrap(items[i], i == current);
|
||||
if (msg_col > 0) {
|
||||
msg_putchar('\n');
|
||||
|
Reference in New Issue
Block a user