forked from aniani/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 #3444)
This commit is contained in:
@@ -794,6 +794,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
404,
|
||||
/**/
|
||||
403,
|
||||
/**/
|
||||
@@ -1725,7 +1727,7 @@ 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)
|
||||
|
Reference in New Issue
Block a user