summaryrefslogtreecommitdiff
path: root/source/ap/vim/patches/7.3.373
blob: 3e8937a030bceed0870b395770af759fe3d80eff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
To: vim_dev@googlegroups.com
Subject: Patch 7.3.373
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.3.373 (after 7.3.366)
Problem:    A tags file with an extremely long name may cause an infinite loop.
Solution:   When encountering a long name switch to linear search.
Files:	    src/tag.c


*** ../vim-7.3.372/src/tag.c	2011-12-08 15:12:08.000000000 +0100
--- src/tag.c	2011-12-14 14:13:28.000000000 +0100
***************
*** 1854,1860 ****
  
  		if (state == TS_BINARY && orgpat.regmatch.rm_ic && !sortic)
  		{
! 		    /* binary search won't work for ignoring case, use linear
  		     * search. */
  		    linear = TRUE;
  		    state = TS_LINEAR;
--- 1854,1860 ----
  
  		if (state == TS_BINARY && orgpat.regmatch.rm_ic && !sortic)
  		{
! 		    /* Binary search won't work for ignoring case, use linear
  		     * search. */
  		    linear = TRUE;
  		    state = TS_LINEAR;
***************
*** 1922,1927 ****
--- 1922,1940 ----
  			    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;
  		    }
  
*** ../vim-7.3.372/src/version.c	2011-12-08 18:44:47.000000000 +0100
--- src/version.c	2011-12-14 14:12:06.000000000 +0100
***************
*** 716,717 ****
--- 716,719 ----
  {   /* Add new patch number below this line */
+ /**/
+     373,
  /**/

-- 
ZOOT:  I'm afraid our life must seem very dull and quiet compared to yours.
       We are but eightscore young blondes, all between sixteen and
       nineteen-and-a-half, cut off in this castle, with no one to protect us.
       Oooh.  It is a lonely life ... bathing ...  dressing ... undressing ...
       making exciting underwear....
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///