# HG changeset patch # User Christian Brabandt # Date 1518189305 -3600 # Node ID 891b821d36023eadf2079811b286740a0a33c58f # Parent 033bca1153e7cf7cc5b3348acd8fd1c19d35b2bc patch 8.0.1483: searchpair() might return an invalid value on timeout commit https://github.com/vim/vim/commit/9d32276b52a63fccfae681f0d1d6ccb66efec1c0 Author: Bram Moolenaar Date: Fri Feb 9 16:04:25 2018 +0100 patch 8.0.1483: searchpair() might return an invalid value on timeout Problem: Searchpair() might return an invalid value on timeout. Solution: When the second search times out, do not accept a match from the first search. (Daniel Hahler, closes #2552) diff --git a/src/search.c b/src/search.c --- a/src/search.c +++ b/src/search.c @@ -973,7 +973,16 @@ searchit( NULL, NULL #endif )) == 0) + { +#ifdef FEAT_RELTIME + /* If the search timed out, we did find a match + * but it might be the wrong one, so that's not + * OK. */ + if (timed_out != NULL && *timed_out) + match_ok = FALSE; +#endif break; + } /* Need to get the line pointer again, a * multi-line search may have made it invalid. */ diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -772,6 +772,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1483, +/**/ 1482, /**/ 1481,