summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@vim.org>2011-12-08 15:12:11 +0100
committerBram Moolenaar <bram@vim.org>2011-12-08 15:12:11 +0100
commitb0d7d143c64da00336c57436bcc5626d241cea4d (patch)
tree1be162a2b6b1ca8e7c98bcf481d237f1cf2841b7
parent0a26f5769a12bd8e5f068f09df93ecc538e143cb (diff)
downloadvim-b0d7d143c64da00336c57436bcc5626d241cea4d.tar.gz
updated for version 7.3.366v7.3.366v7-3-366
Problem: A tags file with an extremely long name causes errors. Solution: Ignore tags that are too long. (Arno Renevier)
-rw-r--r--src/tag.c18
-rw-r--r--src/version.c2
2 files changed, 18 insertions, 2 deletions
diff --git a/src/tag.c b/src/tag.c
index f06b0236..f9738ef0 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -1906,12 +1906,26 @@ line_read_in:
tagp.tagname = lbuf;
#ifdef FEAT_TAG_ANYWHITE
tagp.tagname_end = skiptowhite(lbuf);
- if (*tagp.tagname_end == NUL) /* corrupted tag line */
+ if (*tagp.tagname_end == NUL)
#else
tagp.tagname_end = vim_strchr(lbuf, TAB);
- if (tagp.tagname_end == NULL) /* corrupted tag line */
+ if (tagp.tagname_end == NULL)
#endif
{
+ if (vim_strchr(lbuf, NL) == NULL)
+ {
+ /* Truncated line, ignore it. Has been reported for
+ * Mozilla JS with extremely long names. */
+ if (p_verbose >= 5)
+ {
+ verbose_enter();
+ MSG(_("Ignoring long line in tags file"));
+ verbose_leave();
+ }
+ continue;
+ }
+
+ /* Corrupted tag line. */
line_error = TRUE;
break;
}
diff --git a/src/version.c b/src/version.c
index 3cb21950..ec69cb19 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 */
/**/
+ 366,
+/**/
365,
/**/
364,