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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
|
To: vim-dev@vim.org
Subject: Patch 7.2.157
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------
Patch 7.2.157
Problem: Illegal memory access when searching in path.
Solution: Avoid looking at a byte after end of a string. (Dominique Pelle)
Files: src/search.c
*** ../vim-7.2.156/src/search.c Fri Jul 18 12:05:58 2008
--- src/search.c Wed Apr 22 12:26:19 2009
***************
*** 2327,2334 ****
for (col = pos.col; check_prevcol(linep, col, '\\', &col);)
bslcnt++;
}
! /* Only accept a match when 'M' is in 'cpo' or when ecaping is
! * what we expect. */
if (cpo_bsl || (bslcnt & 1) == match_escaped)
{
if (c == initc)
--- 2336,2343 ----
for (col = pos.col; check_prevcol(linep, col, '\\', &col);)
bslcnt++;
}
! /* Only accept a match when 'M' is in 'cpo' or when escaping
! * is what we expect. */
if (cpo_bsl || (bslcnt & 1) == match_escaped)
{
if (c == initc)
***************
*** 4663,4669 ****
msg_putchar('\n'); /* cursor below last one */
if (!got_int) /* don't display if 'q'
typed at "--more--"
! mesage */
{
msg_home_replace_hl(new_fname);
MSG_PUTS(_(" (includes previously listed match)"));
--- 4672,4678 ----
msg_putchar('\n'); /* cursor below last one */
if (!got_int) /* don't display if 'q'
typed at "--more--"
! message */
{
msg_home_replace_hl(new_fname);
MSG_PUTS(_(" (includes previously listed match)"));
***************
*** 4975,4981 ****
|| IObuff[i-2] == '!'))))
IObuff[i++] = ' ';
}
! /* copy as much as posible of the new word */
if (p - aux >= IOSIZE - i)
p = aux + IOSIZE - i - 1;
STRNCPY(IObuff + i, aux, p - aux);
--- 4984,4990 ----
|| IObuff[i-2] == '!'))))
IObuff[i++] = ' ';
}
! /* copy as much as possible of the new word */
if (p - aux >= IOSIZE - i)
p = aux + IOSIZE - i - 1;
STRNCPY(IObuff + i, aux, p - aux);
***************
*** 5010,5016 ****
if (did_show)
msg_putchar('\n'); /* cursor below last one */
if (!got_int) /* don't display if 'q' typed
! at "--more--" mesage */
msg_home_replace_hl(curr_fname);
prev_fname = curr_fname;
}
--- 5019,5025 ----
if (did_show)
msg_putchar('\n'); /* cursor below last one */
if (!got_int) /* don't display if 'q' typed
! at "--more--" message */
msg_home_replace_hl(curr_fname);
prev_fname = curr_fname;
}
***************
*** 5092,5098 ****
}
if (action != ACTION_SHOW)
{
! curwin->w_cursor.col = (colnr_T) (startp - line);
curwin->w_set_curswant = TRUE;
}
--- 5101,5107 ----
}
if (action != ACTION_SHOW)
{
! curwin->w_cursor.col = (colnr_T)(startp - line);
curwin->w_set_curswant = TRUE;
}
***************
*** 5119,5125 ****
&& action == ACTION_EXPAND
&& !(compl_cont_status & CONT_SOL)
#endif
! && *(p = startp + 1))
goto search_line;
}
line_breakcheck();
--- 5128,5135 ----
&& action == ACTION_EXPAND
&& !(compl_cont_status & CONT_SOL)
#endif
! && *startp != NUL
! && *(p = startp + 1) != NUL)
goto search_line;
}
line_breakcheck();
*** ../vim-7.2.156/src/version.c Wed Apr 22 16:22:44 2009
--- src/version.c Wed Apr 22 16:39:59 2009
***************
*** 678,679 ****
--- 678,681 ----
{ /* Add new patch number below this line */
+ /**/
+ 157,
/**/
--
ARTHUR: Bloody peasant!
DENNIS: Oh, what a give away. Did you hear that, did you hear that, eh?
That's what I'm on about -- did you see him repressing me, you saw it
didn't you?
The Quest for the Holy Grail (Monty Python)
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|