summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2011-12-14 14:15:16 +0100
committerBram Moolenaar <Bram@vim.org>2011-12-14 14:15:16 +0100
commit08fc756582a54958e32a6fda9e978e469d1ef7bc (patch)
tree3d32fc14addb7a7b8afcaf38c9936d6c991a4489 /src
parent96a8964564ab4acdb722b81f9d146485e6321106 (diff)
downloadvim-08fc756582a54958e32a6fda9e978e469d1ef7bc.zip
updated for version 7.3.373
Problem: A tags file with an extremely long name may cause an infinite loop. Solution: When encountering a long name switch to linear search.
Diffstat (limited to 'src')
-rw-r--r--src/tag.c15
-rw-r--r--src/version.c2
2 files changed, 16 insertions, 1 deletions
diff --git a/src/tag.c b/src/tag.c
index f9738ef03..41c7c582e 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -1854,7 +1854,7 @@ line_read_in:
if (state == TS_BINARY && orgpat.regmatch.rm_ic && !sortic)
{
- /* binary search won't work for ignoring case, use linear
+ /* Binary search won't work for ignoring case, use linear
* search. */
linear = TRUE;
state = TS_LINEAR;
@@ -1922,6 +1922,19 @@ line_read_in:
MSG(_("Ignoring long line in tags file"));
verbose_leave();
}
+#ifdef FEAT_TAG_BINS
+ if (state != TS_LINEAR)
+ {
+ /* Avoid getting stuck. */
+ linear = TRUE;
+ state = TS_LINEAR;
+# ifdef HAVE_FSEEKO
+ fseeko(fp, search_info.low_offset, SEEK_SET);
+# else
+ fseek(fp, (long)search_info.low_offset, SEEK_SET);
+# endif
+ }
+#endif
continue;
}
diff --git a/src/version.c b/src/version.c
index e2f60f61c..af276df8f 100644
--- a/src/version.c
+++ b/src/version.c
@@ -715,6 +715,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 373,
+/**/
372,
/**/
371,