From cbda383efefc78f87f8574a960f4c41a8d8107c9 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 5 May 2019 09:50:34 -0400 Subject: 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) https://github.com/vim/vim/commit/e961cba3cb8281c47f1dc2c2bc031b07504f17d4 --- src/nvim/version.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/version.c') diff --git a/src/nvim/version.c b/src/nvim/version.c index 28bd22dcb3..baa0df84f4 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -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'); -- cgit