0
0
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:
Bram Moolenaar
2016-06-12 23:03:19 +02:00
parent c95a302a4c
commit a890f5e348
2 changed files with 3 additions and 1 deletions

View File

@@ -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++)

View File

@@ -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,
/**/ /**/