mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
patch 7.4.1926
Problem: Possible crash with many history items. Solution: Avoid the index going past the last item.
This commit is contained in:
@@ -6448,7 +6448,7 @@ merge_history(int type)
|
|||||||
else
|
else
|
||||||
clear_hist_entry(&new_hist[i]);
|
clear_hist_entry(&new_hist[i]);
|
||||||
}
|
}
|
||||||
hisidx[type] = len - 1;
|
hisidx[type] = (i < len ? i : len) - 1;
|
||||||
|
|
||||||
/* Free what is not kept. */
|
/* Free what is not kept. */
|
||||||
for (i = 0; i < viminfo_hisidx[type]; i++)
|
for (i = 0; i < viminfo_hisidx[type]; i++)
|
||||||
|
@@ -753,6 +753,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1926,
|
||||||
/**/
|
/**/
|
||||||
1925,
|
1925,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user