mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:7.4.623
Problem: Crash with pattern: \(\)\{80000} (Dominique Pelle)
Solution: When the max limit is large fall back to the old engine.
a1d2c58985
This commit is contained in:
parent
a03af86cc2
commit
798fe6cfa3
@ -1897,9 +1897,10 @@ static int nfa_regpiece(void)
|
||||
return OK;
|
||||
}
|
||||
|
||||
// The engine is very inefficient (uses too many states) when the maximum is
|
||||
// much larger than the minimum. Bail out if we can use the other engine.
|
||||
if ((nfa_re_flags & RE_AUTO) && maxval > minval + 200) {
|
||||
// The engine is very inefficient (uses too many states) when the maximum
|
||||
// is much larger than the minimum and when the maximum is large. Bail out
|
||||
// if we can use the other engine.
|
||||
if ((nfa_re_flags & RE_AUTO) && (maxval > minval + 200 || maxval > 500)) {
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
|
@ -373,7 +373,7 @@ static int included_patches[] = {
|
||||
// 626 NA
|
||||
// 625 NA
|
||||
// 624,
|
||||
// 623,
|
||||
623,
|
||||
// 622 NA
|
||||
// 621 NA
|
||||
// 620,
|
||||
|
Loading…
Reference in New Issue
Block a user