mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
updated for version 7.3.366
Problem: A tags file with an extremely long name causes errors. Solution: Ignore tags that are too long. (Arno Renevier)
This commit is contained in:
18
src/tag.c
18
src/tag.c
@@ -1906,12 +1906,26 @@ line_read_in:
|
|||||||
tagp.tagname = lbuf;
|
tagp.tagname = lbuf;
|
||||||
#ifdef FEAT_TAG_ANYWHITE
|
#ifdef FEAT_TAG_ANYWHITE
|
||||||
tagp.tagname_end = skiptowhite(lbuf);
|
tagp.tagname_end = skiptowhite(lbuf);
|
||||||
if (*tagp.tagname_end == NUL) /* corrupted tag line */
|
if (*tagp.tagname_end == NUL)
|
||||||
#else
|
#else
|
||||||
tagp.tagname_end = vim_strchr(lbuf, TAB);
|
tagp.tagname_end = vim_strchr(lbuf, TAB);
|
||||||
if (tagp.tagname_end == NULL) /* corrupted tag line */
|
if (tagp.tagname_end == NULL)
|
||||||
#endif
|
#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;
|
line_error = TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -714,6 +714,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
366,
|
||||||
/**/
|
/**/
|
||||||
365,
|
365,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user