mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:7.4.799
Problem: Accessing memory before an allocated block. Solution: Check for not going before the start of a pattern. (Dominique Pelle) https://github.com/vim/vim/commit/v7-4-799
This commit is contained in:
parent
2753be6e4d
commit
54973477e7
@ -5749,16 +5749,19 @@ static int do_autocmd_event(event_T event, char_u *pat, int nested, char_u *cmd,
|
||||
* Find end of the pattern.
|
||||
* Watch out for a comma in braces, like "*.\{obj,o\}".
|
||||
*/
|
||||
endpat = pat;
|
||||
// ignore single comma
|
||||
if (*endpat == ',') {
|
||||
continue;
|
||||
}
|
||||
brace_level = 0;
|
||||
for (endpat = pat; *endpat && (*endpat != ',' || brace_level
|
||||
|| endpat[-1] == '\\'); ++endpat) {
|
||||
for (; *endpat && (*endpat != ',' || brace_level || endpat[-1] == '\\');
|
||||
++endpat) {
|
||||
if (*endpat == '{')
|
||||
brace_level++;
|
||||
else if (*endpat == '}')
|
||||
brace_level--;
|
||||
}
|
||||
if (pat == endpat) /* ignore single comma */
|
||||
continue;
|
||||
patlen = (int)(endpat - pat);
|
||||
|
||||
/*
|
||||
|
@ -98,7 +98,7 @@ static int included_patches[] = {
|
||||
//802,
|
||||
//801,
|
||||
//800,
|
||||
//799,
|
||||
799,
|
||||
//798,
|
||||
//797,
|
||||
//796,
|
||||
|
Loading…
Reference in New Issue
Block a user