# HG changeset patch # User Christian Brabandt # Date 1465766107 -7200 # Node ID af25a1a875db89d800f4c226bcfe9e1a4f7bf5b3 # Parent 64035abb986bc03b2933be35d45b3fd4f3a8736a commit https://github.com/vim/vim/commit/a890f5e34887bff7616bdb4b9ee0bf98c8d2a8f0 Author: Bram Moolenaar Date: Sun Jun 12 23:03:19 2016 +0200 patch 7.4.1926 Problem: Possible crash with many history items. Solution: Avoid the index going past the last item. diff --git a/src/ex_getln.c b/src/ex_getln.c --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -6448,7 +6448,7 @@ merge_history(int type) else clear_hist_entry(&new_hist[i]); } - hisidx[type] = len - 1; + hisidx[type] = (i < len ? i : len) - 1; /* Free what is not kept. */ for (i = 0; i < viminfo_hisidx[type]; i++) diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -754,6 +754,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1926, +/**/ 1925, /**/ 1924,