]> git.pld-linux.org Git - packages/vim.git/blame - 7.3.365
- new
[packages/vim.git] / 7.3.365
CommitLineData
ae497238
AG
1To: vim_dev@googlegroups.com
2Subject: Patch 7.3.365
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 7.3.365
11Problem: Crash when using a large Unicode character in a file that has
12 syntax highlighting. (ngollan)
13Solution: Check for going past the end of the utf tables. (Dominique Pelle)
14Files: src/mbyte.c
15
16
17*** ../vim-7.3.364/src/mbyte.c 2011-08-10 13:21:30.000000000 +0200
18--- src/mbyte.c 2011-12-08 15:09:13.000000000 +0100
19***************
20*** 2764,2782 ****
21 int tableSize;
22 {
23 int start, mid, end; /* indices into table */
24
25 start = 0;
26! end = tableSize / sizeof(convertStruct);
27 while (start < end)
28 {
29 /* need to search further */
30! mid = (end + start) /2;
31 if (table[mid].rangeEnd < a)
32 start = mid + 1;
33 else
34 end = mid;
35 }
36! if (table[start].rangeStart <= a && a <= table[start].rangeEnd
37 && (a - table[start].rangeStart) % table[start].step == 0)
38 return (a + table[start].offset);
39 else
40--- 2764,2785 ----
41 int tableSize;
42 {
43 int start, mid, end; /* indices into table */
44+ int entries = tableSize / sizeof(convertStruct);
45
46 start = 0;
47! end = entries;
48 while (start < end)
49 {
50 /* need to search further */
51! mid = (end + start) / 2;
52 if (table[mid].rangeEnd < a)
53 start = mid + 1;
54 else
55 end = mid;
56 }
57! if (start < entries
58! && table[start].rangeStart <= a
59! && a <= table[start].rangeEnd
60 && (a - table[start].rangeStart) % table[start].step == 0)
61 return (a + table[start].offset);
62 else
63***************
64*** 2791,2797 ****
65 utf_fold(a)
66 int a;
67 {
68! return utf_convert(a, foldCase, sizeof(foldCase));
69 }
70
71 static convertStruct toLower[] =
72--- 2794,2800 ----
73 utf_fold(a)
74 int a;
75 {
76! return utf_convert(a, foldCase, (int)sizeof(foldCase));
77 }
78
79 static convertStruct toLower[] =
80***************
81*** 3119,3125 ****
82 return TOUPPER_LOC(a);
83
84 /* For any other characters use the above mapping table. */
85! return utf_convert(a, toUpper, sizeof(toUpper));
86 }
87
88 int
89--- 3122,3128 ----
90 return TOUPPER_LOC(a);
91
92 /* For any other characters use the above mapping table. */
93! return utf_convert(a, toUpper, (int)sizeof(toUpper));
94 }
95
96 int
97***************
98*** 3152,3158 ****
99 return TOLOWER_LOC(a);
100
101 /* For any other characters use the above mapping table. */
102! return utf_convert(a, toLower, sizeof(toLower));
103 }
104
105 int
106--- 3155,3161 ----
107 return TOLOWER_LOC(a);
108
109 /* For any other characters use the above mapping table. */
110! return utf_convert(a, toLower, (int)sizeof(toLower));
111 }
112
113 int
114*** ../vim-7.3.364/src/version.c 2011-12-01 20:59:16.000000000 +0100
115--- src/version.c 2011-12-08 15:07:53.000000000 +0100
116***************
117*** 716,717 ****
118--- 716,719 ----
119 { /* Add new patch number below this line */
120+ /**/
121+ 365,
122 /**/
123
124--
125Hear about the guy who played a blank tape at full blast?
126The mime next door went nuts.
127
128 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
129/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
130\\\ an exciting new programming language -- http://www.Zimbu.org ///
131 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
This page took 0.075891 seconds and 4 git commands to generate.