]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.366 v7.3.366
authorBram Moolenaar <Bram@vim.org>
Thu, 8 Dec 2011 14:12:11 +0000 (15:12 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 8 Dec 2011 14:12:11 +0000 (15:12 +0100)
Problem:    A tags file with an extremely long name causes errors.
Solution:   Ignore tags that are too long. (Arno Renevier)

src/tag.c
src/version.c

index f06b0236078c1ecd858d10919ba2b5c642680707..f9738ef03252bcf8e785127ba63dbaf06574f4c1 100644 (file)
--- 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;
                }
index 3cb219504f5aa94db00f00f75065ebf67a3a49be..ec69cb198cac07c01173b38e37e0ed3baea91e18 100644 (file)
@@ -714,6 +714,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    366,
 /**/
     365,
 /**/